<p>I am following the sample azure file mentioned at <a href="https://github.com/Azure-Samples/azure-voting-app-redis/blob/master/kubernetes-manifests/azure-vote-all-in-one-redis.yaml" rel="nofollow noreferrer">Azure Voting App</a><br>
I have a deployment file like:</p>

<pre><code>apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: azure-vote-front
spec:
  replicas: 1
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  minReadySeconds: 5 
  template:
    metadata:
      labels:
        app: azure-vote-front
    spec:
      containers:
      - name: azure-vote-front
        image: microsoft/azure-vote-front:redis-v1
        ports:
        - containerPort: 80
        resources:
          requests:
            cpu: 250m
          limits:
            cpu: 500m
        env:
        - name: REDIS
          value: "azure-vote-back"
</code></pre>

<p>I want to add an <code>imagePullSecret</code> to this file using a CLI and tried the following patch command which isn't working as expected. Can someone let me know what is the right way to add <code>impagePullSecret</code> to the deployment without modifying manually?</p>

<pre><code>kubectl patch deployment azure-vote-front -p '{"spec":{"template":{"spec":{"imagePullSecret":[{"name":"mykey"}]}}}}'
</code></pre>

<p><strong>Error:</strong></p>

<pre><code>Error from server: json: cannot unmarshal string into Go value of type map[string]interface {}
</code></pre>

<p>Can you tell me what is wrong with the patch command?</p>

<p>I'm not sure if it was merely an "example typo", or if that was quite literally your <code>patch</code> command, but the field is <code>imagePullSecrets</code>, plural (as the array contents might hint at), not <code>imagePullSecret</code> singular</p>
