<p>I have a pod that I can see on GKE. But if I try to delete them, I got the error:</p>
<pre><code>kubectl delete pod my-pod --namespace=kube-system --context=cluster-1 
</code></pre>
<blockquote>
<p>Error from server (NotFound): pods &quot;my-pod&quot; not found</p>
</blockquote>
<p>However, if I try to patch it, the operation was completed successfully:</p>
<pre><code>kubectl patch deployment my-pod --namespace kube-system -p &quot;{\&quot;spec\&quot;:{\&quot;template\&quot;:{\&quot;metadata\&quot;:{\&quot;annotations\&quot;:{\&quot;secrets-update\&quot;:\&quot;`date +'%s'`\&quot;}}}}}&quot; --context=cluster-1
</code></pre>
<blockquote>
<p>deployment.apps/my-pod patched</p>
</blockquote>
<p>Same namespace, same context, same pod. Why kubectl fails to delete the pod?</p>

Rodrigo
<pre><code>kubectl patch deployment my-pod --namespace kube-system -p &quot;{\&quot;spec\&quot;:{\&quot;template\&quot;:{\&quot;metadata\&quot;:{\&quot;annotations\&quot;:{\&quot;secrets-update\&quot;:\&quot;`date +'%s'`\&quot;}}}}}&quot; --context=cluster-1
</code></pre>
<p>You are patching the <strong>deployment</strong> here, not the pod.</p>
<p>Additionally, your <strong>pod</strong> will not be called &quot;my-pod&quot; but would be called the name of your deployment plus a hash (random set of letters and numbers), something like &quot;my-pod-ace3g&quot;</p>
<p>To see the pods in the namespace use</p>
<p><code>kubectl get pods -n {namespace}</code></p>
<p>Since you've put the deployment in the &quot;kube-system&quot; namespace, you would use</p>
<p><code>kubectl get pods -n kube-system</code></p>
<p>Side note: Generally don't use the <code>kube-system</code> namespace unless your deployment is related to the cluster functionality. There's a namespace called <code>default</code> you can use to test things</p>
