Tuesday 28 July 2020

Kubernetes: --show-labels: Get labels associated with a resource

‘—show-labels’ option is used to get the labels associated with a resource.

 

For example, below statement prints the labels associated with all the pods.

 

kubectl get pods --show-labels

$kubectl get pods --show-labels
NAME               READY   STATUS    RESTARTS   AGE     LABELS
employee-service   1/1     Running   0          3h29m   app=employee-service,author=krishna,serviceType=webservice




Previous                                                    Next                                                    Home

No comments:

Post a Comment