Recall & Review
beginner
What is the purpose of the
kubectl debug command?The
kubectl debug command helps you create a temporary debugging container or pod to inspect and fix issues in your running Kubernetes pods without changing the original pod.Click to reveal answer
beginner
How does
kubectl debug differ from kubectl exec?kubectl exec runs commands inside an existing container, while kubectl debug can create a new debugging container or pod with extra tools to help investigate problems.Click to reveal answer
intermediate
How do you create an ephemeral container inside a running pod with
kubectl debug?Run
kubectl debug <pod-name> --image=busybox --target=<container-name> without the --copy-to flag to add a temporary container inside a running pod for debugging.Click to reveal answer
intermediate
Why are ephemeral containers useful for debugging?
Ephemeral containers let you add debugging tools to a running pod without restarting or changing it, so you can inspect the pod's state safely and quickly.Click to reveal answer
beginner
What is a common use case for
kubectl debug when a pod is stuck or not responding?You can use
kubectl debug to start a new pod with the same configuration or add an ephemeral container to inspect logs, network, or file system to find the cause of the problem.Click to reveal answer
What does
kubectl debug pod-name --image=busybox do?✗ Incorrect
It adds a temporary container inside the running pod to help with debugging.
Which command helps you create a new pod for debugging based on an existing pod's configuration?
✗ Incorrect
The --copy-to option creates a new pod for debugging using the existing pod's setup.
Why might you prefer
kubectl debug over restarting a pod to fix an issue?✗ Incorrect
kubectl debug lets you inspect the pod live without restarting or interrupting it.Which of these is NOT a feature of
kubectl debug?✗ Incorrect
kubectl debug helps inspect and troubleshoot but does not automatically fix errors.What is the first step to start debugging a pod with
kubectl debug?✗ Incorrect
You need to know the pod name to target it for debugging.
Explain how
kubectl debug helps troubleshoot a stuck pod.Think about how you can add tools or create a copy pod to look inside without stopping the original pod.
You got /4 concepts.
Describe the difference between
kubectl exec and kubectl debug.Consider what each command does inside or outside the pod.
You got /4 concepts.