restartPolicy: Unsupported value: "Never": supported values: "Always"

You should use a Job controller instead of a StatefulSet:

A Job creates one or more Pods and ensures that a specified number of them successfully terminate. As pods successfully complete, the Job tracks the successful completions.

Take a look at Handling Pod and Container Failures section, which explains the effects of using restartPolicy with values OnFailure or Never, combined with another configs such as parallelism, completions and backoffLimit.


Please see https://github.com/kubernetes/kubernetes/issues/24725

It appears that only "Always" is supported.

Tags:

Kubernetes