Bird
0
0

Which of the following is the correct syntax to start a debug container named debugger on a pod called myapp-1?

easy📝 Syntax Q3 of 15
Kubernetes - Troubleshooting
Which of the following is the correct syntax to start a debug container named debugger on a pod called myapp-1?
Akubectl debug pod/myapp-1 -c debugger --image=busybox
Bkubectl debug myapp-1 -c debugger
Ckubectl debug myapp-1 --image=debugger
Dkubectl debug pod/myapp-1 --container=debugger
Step-by-Step Solution
Solution:
  1. Step 1: Understand kubectl debug syntax

    The correct syntax to add a debug container includes specifying the pod, container name with -c, and the debug container image with --image.
  2. Step 2: Analyze options

    kubectl debug pod/myapp-1 -c debugger --image=busybox correctly uses pod/myapp-1, -c debugger, and --image=busybox to start a debug container. Others miss image or use wrong flags.
  3. Final Answer:

    kubectl debug pod/myapp-1 -c debugger --image=busybox -> Option A
  4. Quick Check:

    Correct syntax = pod name + container + image [OK]
Quick Trick: kubectl debug pod/name -c container --image=image [OK]
Common Mistakes:
  • Omitting --image flag
  • Using container name without -c
  • Not prefixing pod with pod/

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kubernetes Quizzes