312-97 practice question 10 of 35
(Jason Wylie has been working as a DevSecOps engineer in an IT company located in Sacramento, Californi a. He would like to use Jenkins for CI and…
Full set: 100 questionsThe kubectl get pods command is used to list one or more pods. To view resources within a specific namespace, the --namespace or its shorthand -n flag must be used. Since the Jenkins application was deployed into a namespace named "jenkins," the command kubectl get pods -n jenkins correctly targets that namespace and lists the pods running within it. This is the standard and correct procedure for querying namespaced resources in Kubernetes.
A. The -k flag is used for kustomize, which manages Kubernetes configuration, not for specifying a namespace in a get command.
B. The -s or --server flag is used to specify the address and port of the Kubernetes API server, not to filter resources by namespace.
D. The -p or --prune flag is an option for the kubectl apply command to remove resources and is not a valid flag for kubectl get pods.
- Kubernetes Documentation, kubectl get command. "Display one or many resources... Use the --namespace flag to specify the namespace." (kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#get)
- Kubernetes Documentation, Namespaces. "kubectl supports a --namespace flag for most commands to specify the namespace for the request." (kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/)
Keep practicing
Take the free 312-97 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 312-97 practice questions
- Question 1(Sandra Oliver joined SinClare Soft Pvt. Ltd. as a DevSecOps engineer in January of 2010.…
- Question 2(Robert Wheeler has been working as a DevSecOps engineer in an IT company for the past 5 …
- Question 3(Debra Aniston is a DevSecOps engineer in an IT company that develops software products a…
- Question 4(Craig Kelly has been working as a software development team leader in an IT company over…
- Question 5(Walter O’Brien recently joined as a junior DevSecOps engineer in an IT company located i…
- Question 6(SinCaire is a software development company that develops web applications for various cl…
