Bird
0
0

How do you continuously stream logs from a pod named app-pod using kubectl?

easy📝 Conceptual Q2 of 15
Kubernetes - kubectl Essential Commands
How do you continuously stream logs from a pod named app-pod using kubectl?
Akubectl logs app-pod --follow
Bkubectl logs app-pod --tail=10
Ckubectl get logs app-pod
Dkubectl describe pod app-pod
Step-by-Step Solution
Solution:
  1. Step 1: Identify streaming option

    The --follow flag streams logs live.
  2. Step 2: Match command syntax

    kubectl logs app-pod --follow streams logs continuously.
  3. Final Answer:

    kubectl logs app-pod --follow -> Option A
  4. Quick Check:

    --follow streams logs live, --tail limits lines [OK]
Quick Trick: Use --follow to stream logs live [OK]
Common Mistakes:
  • Using --tail to stream logs (only shows last lines)
  • Using kubectl get logs (invalid command)
  • Using kubectl describe (shows pod details, not logs)

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes