0
0
Kubernetesdevops~10 mins

Debugging with kubectl debug in Kubernetes - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to start a debug session on a pod named 'webapp'.

Kubernetes
kubectl debug [1] --image=busybox
Drag options to blanks, or click blank then click option'
Adeployment/webapp
Bwebapp
Cservice/webapp
Dpod/webapp
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the resource type prefix like 'pod/'
Using service or deployment instead of pod
2fill in blank
medium

Complete the command to create a debug pod named 'debugger' based on pod 'api-server'.

Kubernetes
kubectl debug api-server --[1]=debugger --image=busybox
Drag options to blanks, or click blank then click option'
Acopy-to
Bcontainer
Csidecar
Dinit-container
Attempts:
3 left
💡 Hint
Common Mistakes
Using --container instead of --copy-to
Using --sidecar or --init-container which are not valid flags here
3fill in blank
hard

Fix the error in the command to debug pod 'db' by adding an interactive shell.

Kubernetes
kubectl debug pod/db --image=busybox [1]
Drag options to blanks, or click blank then click option'
A-d
B-it
C--restart=Never
D--rm
Attempts:
3 left
💡 Hint
Common Mistakes
Using -d which runs container detached
Using --restart=Never which controls pod restart policy
Using --rm which removes container after exit but doesn't make it interactive
4fill in blank
hard

Fill both blanks to create a debug pod named 'test-debug' from pod 'backend' with no restart.

Kubernetes
kubectl debug pod/backend --[1]=test-debug --[2]=Never --image=busybox
Drag options to blanks, or click blank then click option'
Acopy-to
Brestart
Crestart-policy
Dcontainer
Attempts:
3 left
💡 Hint
Common Mistakes
Using --restart-policy instead of --restart
Using --container instead of --copy-to
5fill in blank
hard

Fill all three blanks to create a debug pod named 'debugger' based on pod 'cache' with image 'busybox' and interactive shell.

Kubernetes
kubectl debug pod/cache --[1]=debugger --image=[2] [3]
Drag options to blanks, or click blank then click option'
Acopy-to
Bbusybox
C-it
Dcontainer
Attempts:
3 left
💡 Hint
Common Mistakes
Using --container instead of --copy-to
Forgetting -it for interactive shell
Using wrong image name