<p>We have an Kubernetes deployment and we would like to add a insecure commnand/flag in below manifest using something like below command</p>
<pre><code>kubectl patch deploy xxxx --type='json' -p='[{&quot;op&quot;: &quot;add&quot;, &quot;value&quot;:&quot;nginx&quot;}]'
</code></pre>
<p>Please help how to achieve this?</p>
<p><strong>Current manifest</strong></p>
<pre><code>spec:
  .
  .
  template:
    .
    . 
    spec:
      .
      .
      containers:
      - command:
        - argocd-server
</code></pre>
<p><strong>New Manifest</strong></p>
<pre><code>spec:
  .
  .
  template:
    .
    . 
    spec:
      .
      .
      containers:
      - command:
        - argocd-server
        - --insecure
</code></pre>

Nitin G
<p>Try this</p>
<pre><code>kubectl patch deployment xxxx --type='json' -p='[{&quot;op&quot;: &quot;replace&quot;, &quot;path&quot;: &quot;/spec/template/spec/containers/0/command&quot;, &quot;value&quot;: [&quot;argocd-server&quot;, &quot;--insecure&quot;]}]'
</code></pre>
<p>and verify the <code>command</code></p>
<pre><code>kubectl get deployment xxxx  -o=json | jq '.spec.template.spec.containers[0].command'
</code></pre>
<p>output</p>
<pre><code>[
  &quot;argocd-server&quot;,
  &quot;--insecure&quot;
]
</code></pre>
