Easy1 markMultiple Choice
Domain 4.2: Managing GKE resourcesDomain 4.2GKEkubectlTroubleshooting

GCP ACE · Question 34 · Domain 4.2: Managing GKE resources

You are troubleshooting an application running on Google Kubernetes Engine (GKE). You need to see a list of all currently running pods in the default namespace to check their status.

Which command should you use?

Answer options:

A.

gcloud container pods list

B.

kubectl get pods

C.

kubectl describe cluster

D.

docker ps

How to approach this question

Identify the basic kubectl command for listing resources.

Full Answer

B.kubectl get pods✓ Correct
kubectl get pods
The `kubectl get` command is used to list resources in Kubernetes. To see the running pods, you use `kubectl get pods`. This will show the pod names, readiness status, and current state (e.g., Running, CrashLoopBackOff).

Common mistakes

Trying to use `gcloud` to view Kubernetes-internal resources.

Practice the full GCP Associate Cloud Engineer Practice Exam 3

50 questions · hints · full answers · grading

More questions from this exam