<p>I'm trying to clean up some leftover data from a failed deployment of rabbitmq.  As such, I have 3 secrets that were being used by rabbit services that never fully started.  Whenever I try to delete these using kubectl delete secret  they get recreated with a similar name instantly (even when using --force).</p>

<p>I do not see any services or pods that are using these secrets, so there shouldn't be any reason they are persisting.  </p>

<p>Example of what happens when I delete:
<a href="https://i.stack.imgur.com/EL8vJ.png" rel="noreferrer"><img src="https://i.stack.imgur.com/EL8vJ.png" alt="enter image description here"></a></p>

<p>The reason they wouldn't delete is because they were associated with a service account.</p>

<p>I found this by looking at their yaml files, which mentioned they were for a service account.</p>

<p>I then ran</p>

<pre><code>kubectl get serviceaccounts
</code></pre>

<p>which returned a list of accounts that had identical names.  After running</p>

<pre><code>kubectl delete serviceaccounts &lt;accountName&gt;
</code></pre>

<p>The secrets removed themselves.</p>

<p>However, if they do not, you can still get and delete them with</p>

<pre><code>kubectl get secrets
kubectl delete secret &lt;secret name&gt;
</code></pre>

<p>If you do not see the item in question, you may want to append --all-namespaces to see "all" of them, as by default it looks at the top level of your kubernetes environment.</p>
