Selectors
Selectors help to choose and find the resources that you are particularly looking for using labels.
$ kubectl create -f <file name for deployment>$ kubectl get pods - -show-labels$ kubectl get pods - -selector env=production$ kubectl get pods --selector dev-lead=carisaWorking with Multiple Selectors
$ kubectl get pods --selector env=production,dev-lead=carisa$ kubectl get pods --selector env=production,dev-lead!=carisaIn and Not In Operator
Deleting pods with labels
Last updated
Was this helpful?