Complete the code to select pods with label app equal to nginx.
kubectl get pods -l app[1]nginxThe correct syntax for equality in label selectors is =. So app=nginx selects pods with label app equal to nginx.
Complete the code to select pods where environment label is not production.
kubectl get pods -l environment[1]productionThe != operator selects pods where the label value is not equal to the given value.
Fix the error in the label selector to select pods with tier either frontend or backend.
kubectl get pods -l tier [1] (frontend,backend)The in operator is used with a set of values in parentheses to select pods with label values matching any in the set.
Complete the code to select pods with role label not in dev or test.
kubectl get pods -l role [1] (dev,test) The notin operator selects pods whose label values are not in the given set. No extra flag is needed after the selector.
Fill both blanks to select pods with label env equal to prod and tier in frontend or backend.
kubectl get pods -l env[1]prod, tier [2] (frontend,backend)
Use = for equality, in for set membership, and no extra characters after the selector.