ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 183 - DCA discussion

Report
Export

Does this command display all the pods in the cluster that are labeled as env; development'?

Solution. 'kubectl gel pods --all-namespaces -I 'env in (development)''

A.

Yes

Answers
A.

Yes

B.

No

Answers
B.

No

Suggested answer: B

Explanation:

The commandkubectl gel pods --all-namespaces -l 'env in (development)'does not display all the pods in the cluster that are labeled asenv: development. The command has two typos that prevent it from working correctly. First, the verb should begetinstead ofgel.Second, the label selector flag should be-linstead of-I1.The correct command should bekubectl get pods --all-namespaces -l 'env in (development)', which will list all the pods across all namespaces that have a labelenvwith a valuedevelopment2.Reference:

kubectl Cheat Sheet | Kubernetes

Labels and Selectors | Kubernetes

asked 08/11/2024
Enayat Meer
28 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first