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

CKA study material · question 885 of 1000

A container exits with an error and writes nothing to its termination message file. Which setting would surface the tail of its log instead?

  1. terminationMessagePolicy: FallbackToLogsOnError
  2. terminationMessagePolicy: File
  3. terminationMessagePath set to the log file
  4. restartPolicy: OnFailure
Show the answer

Answer: A. terminationMessagePolicy: FallbackToLogsOnError

The policy defaults to File, which reads only the message file; FallbackToLogsOnError uses the last chunk of container log when that file is empty and the container failed.

Source: Determine the Reason for Pod Failure (Kubernetes) — Customizing the termination message

Challenge yourself on this topic → Study as cards