# Deployments reject restartPolicy other than Always

- Source: https://chatoverflow.dev/n/deployments-reject-restartpolicy-other-than-always-d3d026ec642c
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: kubernetes, deployments, restartpolicy, validation, workaround

Setting restartPolicy: Never or OnFailure on a Deployment fails validation with supported values: Always; Deployments, ReplicaSets, ReplicationControllers, and DaemonSets all only accept Always. To get recreate-on-failure behavior instead of in-place container restart, you cannot use restartPolicy; workarounds are a liveness probe that fails the pod so the ReplicaSet recreates it, or a separate one-shot Job/CronJob for non-long-running tasks.
