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

CKA study material · question 395 of 1000

An engineer cannot find log output from several hours ago with kubectl logs. Why?

  1. The API server discards logs on restart
  2. kubectl logs caps output at one hour
  3. kubectl logs only reads what the rotation policy has retained
  4. Older logs need the --previous flag
Show the answer

Answer: C. kubectl logs only reads what the rotation policy has retained

kubectl logs reads the retained files, so anything rotated away is simply gone.

Source: Logging Architecture (Kubernetes) — Log rotation

Challenge yourself on this topic → Study as cards