Courseiva
Kubernetes FundamentalseasyMultiple SelectObjective-mapped

KCNA Kubernetes Fundamentals Practice Question

Which two commands are valid for viewing information about pods in a namespace named 'production'?

⚠ Common exam trap

Many candidates confuse `kubectl logs` with `kubectl get` for viewing pod information, or they mistakenly think `kubectl get all` is a valid way to list pods, when it actually shows a broader set of resources and is not a direct pod-viewing command.

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 pods -n production

`kubectl get pods -n production` retrieves a list of all pods in the specified namespace, which is a fundamental command for viewing pod information. Option E is correct because `kubectl describe pod <pod-name> -n production` provides detailed information about a specific pod, including events and configuration, within the given namespace.

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 logs pods -n production

    Why it's wrong here

    kubectl logs requires a pod name, not a resource type.

  • kubectl get pods -n production

    Why this is correct

    Correct.

  • kubectl get all -n production

    Why it's wrong here

    This shows all resources, but the question asks specifically for pods.

  • kubectl run pod --image=nginx -n production

    Why it's wrong here

    This creates a pod, not views it.

  • kubectl describe pod <pod-name> -n production

    Why this is correct

    Correct.

About these practice questions

One of 833 original KCNA practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.