<p>I created a namespace inside Kubernetes and tried to create a container using the following command: </p>

<p><code>kubectl run busybox -it ----image=busybox -- sh</code></p>

<p>But now, everytime I delete the pod using <code>kubectl delete pods --all</code>, it deletes the pod that was just created and it automatically recreates a new pod. I looked through the documentation but am unable to figure out what flag will stop this incessant creation of these containers. </p>

<p>The reason it does this is because <code>kubectl run</code> implicitly creates a deployment for the pod. Deployments are tasked with ensuring a certain number of pods are always running, so when Kubernetes detects a misalignment in the number of pods the deployment <em>should</em> be running vs the number that are actually running, it'll spin up a new one. You can remedy this by deleting the deployment: <code>kubectl delete deployment busybox</code></p>

<p>Alternatively, you can temporarily kill the pods (but keep the deployment) by scaling down the deployment to run 0 pods: <code>kubectl scale deployment busybox --replicas=0</code>.</p>

<p>Documentation: 
<a href="https://kubernetes-v1-4.github.io/docs/user-guide/kubectl/kubectl_run/" rel="nofollow noreferrer">https://kubernetes-v1-4.github.io/docs/user-guide/kubectl/kubectl_run/</a></p>

<blockquote>
  <p>Create and run a particular image, possibly replicated. Creates a deployment or job to manage the created container(s).</p>
</blockquote>
