- Take me to Practice Test
Solutions to Practice Test - Labels and Selectors
-
Run the command 'kubectl get pods --selector env=dev'
$ kubectl get pods --selector env=dev
-
Run the command 'kubectl get pods --selector bu=finance'
$ kubectl get pods --selector bu=finance
-
Run the command 'kubectl get all --selector env=prod'
$ kubectl get all --selector env=prod
-
Run the command 'kubectl get all --selector env=prod,bu=finance,tier=frontend'
$ kubectl get all --selector env=prod,bu=finance,tier=frontend
-
Set the labels on the pod definition template to frontend
$ vi replicaset-definition.yaml $ kubectl create -f replicaset-definition.yaml