Courseiva
Automation, Orchestration, and ScriptinghardMultiple ChoiceObjective-mapped

XK0-006 Automation, Orchestration, and Scripting Practice Question

An administrator is managing a Kubernetes cluster. A pod is running but not responding as expected. The administrator wants to view the standard output logs from the pod's main container. Which kubectl command should be used?

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 logs <pod-name>

kubectl logs <pod-name> retrieves the logs from the specified pod.

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 exec <pod-name> -- cat /var/log/app.log

    Why it's wrong here

    This could be used if the application writes to a log file, but it's not the standard way to view container stdout logs.

  • kubectl get pod <pod-name> -o yaml

    Why it's wrong here

    This outputs the pod's YAML definition, not its logs.

  • kubectl describe pod <pod-name>

    Why it's wrong here

    This shows detailed information about the pod, but not the logs.

  • kubectl logs <pod-name>

    Why this is correct

    This command fetches the logs from the pod.

About these practice questions

This XK0-006 question is part of Courseiva's 979-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 XK0-006 practice question is part of Courseiva's free CompTIA 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 XK0-006 exam.