‘—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
No comments:
Post a Comment