Articles → DOCKER → Labeling In Kubernetes

Labeling In Kubernetes






What Is Labelling?





How To Apply Label?




kubectl label pods [pod_name] [key]=[value]


Picture showing labeling the pod using the kubectl label pods command



How To Check The Pod Label?




kubectl describe pods [pod_name]


Picture showing the command to get the labels associated with pod



Kubectl Get Po --Show-Labels Command




kubectl get po --show-labels


Picture showing the output of kubectl get po --show-labels command



Search The Pod Based On Label




kubectl get po -l [key]=[value]


Picture showing searching the pod based on the label



Posted By  -  Karan Gupta
 
Posted On  -  Monday, January 29, 2024
 
Updated On  -  Friday, February 2, 2024

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250