Study. uk . com
  1. Home
  2. All questions
  3. Question 371

CKA study material · question 371 of 1000

A Pod crashes on startup, so there is nothing to exec into. Which approach helps?

  1. kubectl exec with --stdin --tty
  2. kubectl debug with --copy-to, changing the command to a shell
  3. kubectl logs with --follow
  4. kubectl attach to the crashed container
Show the answer

Answer: B. kubectl debug with --copy-to, changing the command to a shell

kubectl debug --copy-to makes a modified copy of the Pod, which is how a Pod that crashes on startup is examined.

Source: Debug Running Pods (Kubernetes) — Copying a Pod while adding a new container

Challenge yourself on this topic → Study as cards