2V0-31.23 · Question #38
What does the -n commandlet option represent in the kubectl -n prelude get pods command?
The correct answer is A. Namespace. In kubectl, the -n flag stands for namespace, which is a Kubernetes mechanism for isolating groups of resources within a cluster - so kubectl -n prelude get pods lists pods specifically within the prelude namespace. Nginx (B) is a web server/proxy and has no relation to this…
Question
What does the -n commandlet option represent in the kubectl -n prelude get pods command?
Options
- ANamespace
- BNginx
- CNode
- DNew Deployment
How the community answered
(24 responses)- A88% (21)
- C8% (2)
- D4% (1)
Explanation
In kubectl, the -n flag stands for namespace, which is a Kubernetes mechanism for isolating groups of resources within a cluster - so kubectl -n prelude get pods lists pods specifically within the prelude namespace. Nginx (B) is a web server/proxy and has no relation to this flag; Node (C) refers to a cluster worker machine, targeted instead with --field-selector spec.nodeName=... or node-specific subcommands; New Deployment (D) is not a kubectl concept at all. A reliable memory trick: think "-n = named space" - you're naming which space (namespace) to look in, just like specifying a folder before listing its files.
Topics
Community Discussion
No community discussion yet for this question.