Courseiva

CKAD Application Observability and Maintenance Practice Question

You need to view events for a specific pod named 'web-1' in the 'default' namespace. Which command shows events related to this pod?

⚠ Common exam trap

It's easy for candidates to confuse label selectors (`--selector`) with field selectors (`--field-selector`), assuming pod names are labels, when in fact events use the `involvedObject` field for association, not metadata labels.

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 events --field-selector involvedObject.name=web-1

`kubectl get events --field-selector involvedObject.name=web-1` filters events by the `involvedObject.name` field, which directly matches the pod name. This is the precise way to retrieve only events related to a specific pod in Kubernetes, as events are associated with objects via the `involvedObject` field, not labels.

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 get events

    Why it's wrong here

    kubectl get events without any filter returns every event recorded in the current namespace, not just those involving the pod web-1. This produces a large, noisy list that mixes pod, deployment, node, and scheduler events, making it impossible to isolate the relevant incidents for that specific pod. To narrow results, you need an explicit field selector on involvedObject.name, so this command does not satisfy the requirement.

  • ✗

    kubectl describe pod web-1 --events

    Why it's wrong here

    The `kubectl describe pod web-1` command already includes an Events section at the bottom, so adding a nonexistent `--events` flag makes the command fail with a syntax error, not run in a different mode. Even if the flag existed, `describe` is intended for inspecting a single resource's spec and status, not for querying a dedicated events feed across the cluster. The valid approach is to either run `kubectl describe pod web-1` without the flag or use `kubectl get events` with a field selector.

  • ✓

    kubectl get events --field-selector involvedObject.name=web-1

    Why this is correct

    This command correctly narrows the event stream by using the field selector `involvedObject.name=web-1`, which matches the `involvedObject` metadata that every event carries about the resource it references. Field selectors operate on object fields, not labels, so this targets events whose involved object has exactly the name `web-1`. Since pod names are unique within a namespace, this returns all events for that pod, and you can further scope it with `--namespace` or `involvedObject.kind=Pod` if needed.

  • ✗

    kubectl get events --selector name=web-1

    Why it's wrong here

    The `--selector` flag performs label-based selection, but events are not labelable objects—they never carry the `metadata.labels` field that workload resources like pods have. Consequently, running this command yields no results (or an empty list) because no event has a label named `name=web-1`, even though the field `involvedObject.name` exists. This misuse of label selector on a non-labelable resource is why the command fails; field selectors are the appropriate mechanism for filtering events.

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.