<p>For Kubernetes Deployment we can specify imagePullSecrets to allow it to pull Docker images from our private registry. But as far as I can tell, StatefulSet doesn't support this?</p>
<p><strong>How can I supply a pullsecret to my StatefulSet?</strong></p>
<pre><code>apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: redis
  namespace: {{ .Values.namespace }}
  labels:
    app: redis
spec:
  replicas: 1
  selector:
    matchLabels:
      app: redis
  serviceName: redis-service
  updateStrategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: redis
    spec:
      terminationGracePeriodSeconds: 10
      # imagePullSecrets not valid here for StatefulSet :-(
      containers:
        - image: {{ .Values.image }}
</code></pre>

Thomas
<p><code>StatefulSet</code> supports <code>imagePullSecrets</code>. You can check it as follows.</p>
<pre><code>$ kubectl explain statefulset.spec.template.spec --api-version apps/v1
:
   imagePullSecrets &lt;[]Object&gt;
     ImagePullSecrets is an optional list of references to secrets in the same
     namespace to use for pulling any of the images used by this PodSpec. If
     specified, these secrets will be passed to individual puller
     implementations for them to use. For example, in the case of docker, only
     DockerConfig type secrets are honored. More info:
     https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod
:
</code></pre>
<p>For instance, you can try if the following sample <code>StatefulSet</code> can create in your cluster first.</p>
<pre><code>$ kubectl create -f - &lt;&lt;EOF
apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: web
spec:
  serviceName: &quot;nginx&quot;
  replicas: 2
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      imagePullSecrets:
      - name: YOUR-PULL-SECRET-NAME
      containers:
      - name: nginx
        image: k8s.gcr.io/nginx-slim:0.8
        ports:
        - containerPort: 80
          name: web
EOF

$ kubectl get pod web-0 -o yaml | \
  grep -E '^[[:space:]]+imagePullSecrets:' -A1
  imagePullSecrets:
  - name: YOUR-PULL-SECRET-NAME
</code></pre>
