Bird
0
0

Which of the following is the correct syntax to check logs of a Pod named webapp?

easy📝 Syntax Q3 of 15
Kubernetes - Troubleshooting
Which of the following is the correct syntax to check logs of a Pod named webapp?
Akubectl get logs webapp
Bkubectl logs webapp
Ckubectl show logs webapp
Dkubectl describe logs webapp
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct kubectl logs syntax

    The command to view logs is kubectl logs <pod-name>.
  2. Step 2: Identify incorrect commands

    get logs, show logs, and describe logs are invalid kubectl commands.
  3. Final Answer:

    kubectl logs webapp -> Option B
  4. Quick Check:

    View Pod logs = kubectl logs [OK]
Quick Trick: Use 'kubectl logs ' to see Pod logs [OK]
Common Mistakes:
  • Using 'kubectl get logs' which is invalid
  • Confusing describe with logs command
  • Trying 'kubectl show logs' which doesn't exist

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes