nerdexam
Linux_Foundation

KCNA · Question #120

Which of these is a valid container restart policy?

The correct answer is D. On failure. In Kubernetes, a valid container restart policy dictates how a container should be restarted after it terminates.

Submitted by cyberguy42· May 4, 2026Kubernetes Fundamentals

Question

Which of these is a valid container restart policy?

Options

  • AOn login
  • BOn update
  • COn start
  • DOn failure

How the community answered

(30 responses)
  • A
    3% (1)
  • C
    3% (1)
  • D
    93% (28)

Why each option

In Kubernetes, a valid container restart policy dictates how a container should be restarted after it terminates.

AOn login

'On login' is not a recognized container restart policy in Kubernetes.

BOn update

'On update' is not a standard container restart policy; updates typically involve creating new pods/deployments.

COn start

'On start' is not a specific container restart policy; containers generally start once unless a restart policy is triggered by termination.

DOn failureCorrect

The 'OnFailure' restart policy specifies that a container will only be restarted if it terminates with a non-zero exit code, indicating an error. This is a standard and common policy for resilient container applications in Kubernetes.

Concept tested: Kubernetes container restart policies

Source: https://kubernetes.io/docs/concepts/workloads/pods/pod-lifecycle/#restart-policy

Topics

#Container restart policies#Container lifecycle#Kubernetes Pods#Pod lifecycle

Community Discussion

No community discussion yet for this question.

Full KCNA Practice