Google
ASSOCIATE-CLOUD-ENGINEER · Question #345
You created a Kubernetes deployment by running kubectl run nginx image=nginx labels=app=prod. Your Kubernetes cluster is also used by a number of other deployments. How can you find the identifier…
The correct answer is C. kubectl get pods -I "app=prod". This command correctly lists pods that have the label app=prod. When creating the deployment, we used the label app=prod so listing pods that have this label retrieve the pods belonging to nginx deployments. You can list pods by using Kubernetes CLI kubectl get pods.
Submitted by javi_es· Mar 30, 2026Ensuring successful operation of a cloud solution
Question
You created a Kubernetes deployment by running kubectl run nginx image=nginx labels=app=prod. Your Kubernetes cluster is also used by a number of other deployments. How can you find the identifier of the pods for this nginx deployment?
Options
- Akubectl get deployments -output=pods
- Bgcloud get pods -selector="app=prod"
- Ckubectl get pods -I "app=prod"
- Dgcloud list gke-deployments -filter={pod }
How the community answered
(40 responses)- A3% (1)
- B8% (3)
- C88% (35)
- D3% (1)
Explanation
This command correctly lists pods that have the label app=prod. When creating the deployment, we used the label app=prod so listing pods that have this label retrieve the pods belonging to nginx deployments. You can list pods by using Kubernetes CLI kubectl get pods.
Topics
#kubectl label selector#pod filtering#GKE operations
Community Discussion
No community discussion yet for this question.