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

CKA study material · question 442 of 1000

How are an init container's logs read?

  1. kubectl describe pod <pod>
  2. kubectl logs <pod> -c <init-container>
  3. kubectl debug <pod> --target=<init-container>
  4. kubectl logs <pod> --previous
Show the answer

Answer: B. kubectl logs <pod> -c <init-container>

An init container is not the default container, so its name must be given with -c.

Source: Debug Init Containers (Kubernetes) — Getting details about Init Containers

Challenge yourself on this topic → Study as cards