Quick Answer
The restartPolicy: Always setting restarts containers regardless of exit code รขโฌโ even 0 (clean exit). This is intentional for long-running services that should never stop. If your container exits cleanly with 0 but you don't want it restarted, use restartPolicy: OnFailure (restart only on non-zero exit) or restartPolicy: Never.
Answer
RestartPolicy Always forces Pod restarts regardless of exit code.
S
SugharaIQ Editorial Team
Verified Answer
This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.