Courseiva
Application Observability and MaintenanceeasyMultiple ChoiceObjective-mapped

CKAD Application Observability and Maintenance Practice Question

Which command streams logs from a pod in real-time?

⚠ Common exam trap

CNCF often tests the `-f` flag against the non-existent `--stream` flag, exploiting the candidate's assumption that a verbose flag name exists when the actual flag is a short form.

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

`kubectl logs -f` (the `-f` flag stands for 'follow') streams log output from a pod in real-time, similar to `tail -f` on a file. This is the standard Kubernetes command for continuous log monitoring, allowing you to see new log lines as they are written by the container.

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

    Why it's wrong here

    There is no --stream flag; the correct flag is -f or --follow.

  • kubectl logs -f pod-name

    Why this is correct

    The -f flag follows log output in real-time.

  • kubectl logs --previous pod-name

    Why it's wrong here

    This shows logs from the previous instance of the container, not live streaming.

  • kubectl logs pod-name

    Why it's wrong here

    This prints the current logs but does not follow new output.

About these practice questions

This CKAD question is part of Courseiva's 160-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.