Courseiva

CKAD Application Observability and Maintenance Practice Question

Which command outputs the pod's full YAML specification including status?

⚠ Common exam trap

Many exam-takers confuse `kubectl describe` (which shows status in a readable format) with `kubectl get -o yaml` (which outputs the full YAML specification including status), or mistakenly think `--export` preserves status when it actually strips it.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

kubectl get pod <pod-name> -o yaml

`kubectl get pod <pod-name> -o yaml` outputs the full YAML specification of the pod, including its status (e.g., conditions, container statuses, phase). The `-o yaml` flag retrieves the complete Kubernetes resource object from the API server, which includes both the desired spec and the current status, as stored in etcd.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✗

    kubectl describe pod <pod-name>

    Why it's wrong here

    kubectl describe pod <pod-name> renders a human-readable summary organized into sections (Name, Namespace, Priority, Node, Status, etc.) and appends Events, but it does not emit the pod's complete manifest. It omits many spec details (e.g., exact container command, volume projection details) and injects derived information such as QoS class and tolerations, so it cannot serve as the pod's full YAML specification.

  • ✗

    kubectl get pod <pod-name> --export

    Why it's wrong here

    kubectl get pod <pod-name> --export is deprecated and, even when it existed, intentionally removed cluster-specific and runtime fields like clusterIP, nodeName, and status to produce a "clean" manifest for re-creation. Because the question asks for the full specification, this flag truncates exactly the status and other runtime state that -o yaml preserves.

  • ✗

    kubectl get pod <pod-name> -o json

    Why it's wrong here

    kubectl get pod <pod-name> -o json outputs the full pod object, including spec and status, but in JSON syntax. JSON is a valid data interchange format, but the question explicitly requests YAML; YAML and JSON are different serializations, and while YAML supports JSON, the output is not YAML. To get YAML you must set the output format to yaml.

  • ✓

    kubectl get pod <pod-name> -o yaml

    Why this is correct

    kubectl get pod <pod-name> -o yaml returns the live pod object from the API server serialized as YAML, including metadata (annotations/labels), spec, and status. This is the canonical way to dump the complete pod specification as stored by Kubernetes, though it includes defaulted fields and status that aren't part of the original input manifest.

About these practice questions

This CKAD question is part of Courseiva's 826-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This CKAD practice question is part of Courseiva's free CNCF certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the CKAD exam.