Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Associate Cloud Engineer practice bank has an additional 2,014 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
An administrator is troubleshooting an application running on a Google Kubernetes Engine (GKE) cluster. A Pod named payment-processor in the backend namespace has failed to start properly and is reporting a status of CrashLoopBackOff.
The administrator needs to view the Pod's detailed lifecycle events, container exit codes, volume mount statuses, and environmental configurations using the command-line interface.
Which command should the administrator execute to inspect these comprehensive resource details?
kubectl logs DoesThe kubectl logs command streams or prints the standard output (stdout) and standard error (stderr) streams generated by the application running inside a container.
kubectl logs only displays output generated by the application code itself. It does not display Kubernetes-level lifecycle events, such as container crash schedules, probe execution failures, or node binding issues.-c if the Pod has multiple containers.The Pod had successfully passed Kubernetes initialization and startup checks, and the administrator needed to read an internal application stack trace or uncaught software exception.
gcloud container clusters describe DoesThe gcloud container clusters describe command is a Google Cloud SDK tool used to inspect the control plane and infrastructure configuration of an entire GKE cluster, rather than in-cluster Kubernetes workloads.
payment-processor refers to a workload Pod, not a cluster name, and --zone backend assumes an invalid compute zone name rather than a Kubernetes namespace.The objective was to check the status, master version, or node pool configuration of the physical or virtual GKE cluster infrastructure itself.
kubectl describe IsThe kubectl describe command is a core Kubernetes CLI diagnostic tool used to generate a detailed, human-readable summary of one or more cluster resources. It queries the Kubernetes API server for the current state, runtime configuration, and associated controller events related to the target object.
kubectl describe pod payment-processor -n backend aggregates recent cluster events directly associated with the specified Pod. This includes image pull attempts, scheduling decisions, container startup failures, and restart histories.Waiting, Running, or Terminated), exit codes, restart counts, and reasons such as OOMKilled or Error.-n backend flag ensures that the command targets the backend namespace where the payment-processor Pod resides.
While other commands like kubectl get list basic status columns and kubectl logs retrieve stdout/stderr application output, only kubectl describe compiles lifecycle events, container health states, and resource parameters into a single diagnostic view required to resolve pod startup issues.
kubectl get DoesThe kubectl get command retrieves a high-level summary of one or more Kubernetes resources from the API server and displays the information in a concise, tabular format.
kubectl get does not display the cluster event log associated with the Pod. It will show that the Pod is in CrashLoopBackOff, but it will not indicate why (such as missing environment variables, liveness probe failures, or node-level evictions).NAME, READY, STATUS, RESTARTS, and AGE. It does not output container exit codes, mounted volumes, or environment variables.-o wide, -o json, or -o yaml to inspect raw declarations, but still does not include live cluster event streams.The administrator only needed to check whether the Pod was running, view its restart count, or verify its assigned IP address without needing diagnostic lifecycle events.
Administrators typically run kubectl get pods -n backend first to identify failing Pods, followed by kubectl describe on the problematic Pod to diagnose the failure.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated