Docker Certified Associate (DCA) — Question 27
Does this command display all the pods in the cluster that are labeled as ‘env: development’?
‘kubectl get pods -l env=development’
Answer options
- A. Yes
- B. No
Correct answer: B
Explanation
The command 'kubectl get pods -l env=development' specifically retrieves pods with the label 'env=development'. If the command is executed and no pods meet this criteria, the answer would be No, indicating that there are no pods labeled as such. Therefore, the correct answer is B.