<h1>The situation</h1>

<p>I have a kubernetes pod stuck in "Terminating" state that resists pod deletions</p>

<pre><code>NAME                             READY STATUS       RESTARTS   AGE
...
funny-turtle-myservice-xxx-yyy   1/1   Terminating  1          11d
...
</code></pre>

<p>Where <code>funny-turtle</code> is the name of the helm release that have since been deleted.</p>

<h1>What I have tried</h1>

<h3>try to delete the pod.</h3>

<p>Output: <code>pod "funny-turtle-myservice-xxx-yyy" deleted
</code>
Outcome: it still shows up in the same state.
   - also tried with <code>--force --grace-period=0</code>, same outcome with extra warning</p>

<blockquote>
  <p>warning: Immediate deletion does not wait for confirmation that the running resource has been terminated. The resource may continue to run on the cluster indefinitely.</p>
</blockquote>

<h3>try to read the logs (kubectl logs ...).</h3>

<p>Outcome: <code>Error from server (NotFound): nodes "ip-xxx.yyy.compute.internal" not found</code></p>

<h3>try to delete the kubernetes deployment.</h3>

<p>but it does not exist.</p>

<p>So I assume this pod somehow got "disconnected" from the aws API, reasoning from the error message that <code>kubectl logs</code> printed.</p>

<p>I'll take any suggestions or guidance to explain what happened here and how I can get rid of it.</p>

<h3>EDIT 1</h3>

<p>Tried to see if the "ghost" node was still there (<code>kubectl delete node ip-xxx.yyy.compute.internal</code>) but it does not exist.</p>

<p>Try removing the finalizers from the pod:</p>

<pre><code>kubectl patch pod funny-turtle-myservice-xxx-yyy -p '{"metadata":{"finalizers":null}}'
</code></pre>
