Courseiva
Kubernetes Fundamentals →mediumMultiple Choice

KCNA Kubernetes Fundamentals Practice Question

What does the 'kubectl get pods' command display?

⚠ Common exam trap

The exam often tests the distinction between 'get' (list/summary) and 'describe' (detailed info), so candidates mistakenly think 'get pods' shows detailed pod information.

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

✓

A list of all pods in the current namespace

The 'kubectl get pods' command lists all pods in the current namespace, providing a summary of their status, restarts, and age. This is the default behavior without specifying a namespace or pod name, making it the primary command for pod discovery and health checks.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Detailed information about a specific pod

    Why it's wrong here

    Detailed information about one pod comes from kubectl describe pod, which adds events and conditions; get pods returns a summary list across the namespace. Describe is tempting because it is the natural next step when diagnosing a single failing pod after spotting it in the list.

  • ✓

    A list of all pods in the current namespace

    Why this is correct

    kubectl get pods queries the API server for Pod objects in the active namespace, returning name, ready status, phase, restarts and age. This satisfies the listing requirement; adding --all-namespaces or -A would broaden scope beyond the current namespace.

  • ✗

    The YAML definition of a pod

    Why it's wrong here

    The command lists pods with status, readiness, restarts and age in a table; YAML output requires -o yaml. The confusion arises because kubectl can emit YAML, and that format would be the right choice when inspecting a manifest or exporting a resource definition for editing.

  • ✗

    The logs of all pods

    Why it's wrong here

    Logs are retrieved with 'kubectl logs', not 'get pods', which lists pod names, statuses, restarts and ages. The confusion arises because both target pods, and 'get' does return object data; however, log output requires the dedicated logs subcommand.

About these practice questions

This KCNA question is part of Courseiva's 930-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 KCNA 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 KCNA exam.