<p>First time Kubernetes user here.</p>
<p>I deployed a service using <code>kubectl -n my_namespace apply -f new_service.yaml</code></p>
<p>It failed, with the pod showing <code>Warning -Back-off restarting failed container</code></p>
<p>I am now trying to delete the failed objects and redeploy a fixed version. However, I have tried to delete the service, pod, deployment, and replicaset, but they all keep recreating themselves.</p>
<p>I looked at <a href="https://stackoverflow.com/questions/63344878/kubernetes-deployments-replicasets-are-recreated-after-deletion">this thread</a> but don't believe it applies since my deployment list:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
</code></pre>
<p>Any input appreciated!</p>

<p>Posting this as Community wiki for better visibility. Feel free to expand it.</p>
<hr />
<p><strong>In a Kubernetes cluster</strong>:</p>
<ul>
<li>if you delete Pods, but they are recreated again<br />
<code>there is a Kubernetes Deployment / StatefulSet / DaemonSet / job that recreates them</code><br />
<strong>delete a Deployment / StatefulSet / DaemonSet to delete those pods, check k8s jobs</strong></li>
<li>if you delete a ReplicaSet, but it is recreated again<br />
<code>there is a Kubernetes Deployment that recreates it</code><br />
<strong>delete a Deployment to delete this replicaset</strong></li>
<li>if you delete a Deployments / Services, etc., but they are recreated again<br />
<code>there is a deployment tool like ArgoCD / FluxCD / other tool that recreates them</code><br />
<strong>configure ArgoCD / FluxCD / other deployment tool to delete them</strong></li>
<li>also check if Helm is used, run <code>helm list --all-namespaces</code> to list installed releases.</li>
</ul>
<p>Thanks to @P....for comments.</p>
