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

CKA study material · question 932 of 1000

kubectl cp into a distroless container fails. What is the cause, and what is the documented alternative?

  1. The container lacks a shell; use kubectl debug instead
  2. The container lacks tar; pipe tar through kubectl exec
  3. The container is read-only; remount it writable first
  4. The Pod has several containers; add -c
Show the answer

Answer: B. The container lacks tar; pipe tar through kubectl exec

kubectl cp requires a tar binary inside the image and fails without one; piping tar through kubectl exec is the documented way round it.

Source: kubectl cp (Kubernetes) — Examples

Challenge yourself on this topic → Study as cards