Bird
0
0

Which of the following is the correct syntax to start a debug session on a pod named webapp-123?

easy📝 Syntax Q12 of 15
Kubernetes - Troubleshooting
Which of the following is the correct syntax to start a debug session on a pod named webapp-123?
Akubectl debug --pod webapp-123 --image=busybox
Bkubectl debug webapp-123 -image=busybox
Ckubectl debug pod/webapp-123 --image=busybox
Dkubectl debug pod webapp-123 --image=busybox
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct kubectl debug syntax

    The correct syntax uses kubectl debug pod/NAME --image=IMAGE to specify the pod and debug container image.
  2. Step 2: Analyze options

    kubectl debug pod/webapp-123 --image=busybox matches the correct syntax exactly. Options A, B, and C have syntax errors or missing slashes.
  3. Final Answer:

    kubectl debug pod/webapp-123 --image=busybox -> Option C
  4. Quick Check:

    Correct syntax includes 'pod/' prefix = D [OK]
Quick Trick: Use 'pod/NAME' format with --image option for debug [OK]
Common Mistakes:
  • Omitting 'pod/' prefix before pod name
  • Using spaces instead of slash between 'pod' and name
  • Misplacing --image option

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes