KCNA Exam QuestionsBrowse all questions from this exam

KCNA Exam - Question 138


Which of these is a valid container restart policy?

Show Answer
Correct Answer:

Discussion

1 comment
Sign in to comment
shahy0Option: D
Mar 4, 2025

In Kubernetes, a container restart policy defines the conditions under which a container should be restarted. There are three valid restart policies for containers in Kubernetes: Always: The container will always be restarted if it stops, regardless of the exit status. OnFailure: The container will be restarted only if it exits with a non-zero exit status (indicating a failure). Never: The container will not be restarted, regardless of the exit status. The valid container restart policies in Kubernetes are Always, OnFailure, and Never. The correct answer, OnFailure, specifies that the container will be restarted only if it exits with a non-zero exit status, indicating a failure.