<p>I have the following configuration for my pod:</p>

<pre><code>apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: my-app
  labels:
    app: my-app
spec:
  serviceName: my-app
  replicas: 1
  selector:
    matchLabels:
      app: my-app
  template:
    metadata:
      labels:
        app: my-app
    spec:
      restartPolicy: Never
      containers:
      - name: my-app
        image: myregistry:443/mydomain/my-app
        imagePullPolicy: Always
</code></pre>

<p>And it deploys fine without the restartPolicy. However, I do not want the process to be run again once finished, hence I added the 'restartPolicy: Never'. Unfortunately I get the following error when I attempt to deploy:</p>

<pre><code>Error from server (Invalid): error when creating "stack.yaml": StatefulSet.apps "my-app" is invalid: spec.template.spec.restartPolicy: Unsupported value: "Never": supported values: "Always"
</code></pre>

<p>What am I missing?</p>

<p>Thanks</p>

<p>Please see <a href="https://github.com/kubernetes/kubernetes/issues/24725" rel="noreferrer">https://github.com/kubernetes/kubernetes/issues/24725</a></p>

<p>It appears that only "Always" is supported.</p>
