<p><code>kubectl patch --help</code> gives an example where you can patch a specific element with a specific operation:</p>
<pre><code>kubectl patch pod valid-pod --type='json' -p='[{&quot;op&quot;: &quot;replace&quot;, &quot;path&quot;: &quot;/spec/containers/0/image&quot;, &quot;value&quot;:&quot;new
image&quot;}]'
</code></pre>
<p>However, there's no enumeration of possible <code>op</code> values. What operations are available?</p>

<p>Kubectl patch uses <a href="http://jsonpatch.com" rel="noreferrer">json patch</a> under the hood.
Possible op's are : Replace, Add, Remove</p>
<p>Example:</p>
<pre><code>[
  { &quot;op&quot;: &quot;replace&quot;, &quot;path&quot;: &quot;/baz&quot;, &quot;value&quot;: &quot;boo&quot; },
  { &quot;op&quot;: &quot;add&quot;, &quot;path&quot;: &quot;/hello&quot;, &quot;value&quot;: [&quot;world&quot;] },
  { &quot;op&quot;: &quot;remove&quot;, &quot;path&quot;: &quot;/foo&quot; }
]

</code></pre>
