<p>Upon looking at the docs, there is an API call to delete a single pod, but is there a way to delete <em>all</em> pods in all namespaces?</p>

user_mda
<p>There is no command to do exactly what you asked.</p>
<p>Here are some close matches.</p>
<p><strong>Be careful before running any of these commands.  Make sure you are connected to the right cluster, if you use multiple clusters.  Consider running. <code>kubectl config view</code> first.</strong></p>
<p>You can delete all the pods in a single namespace with this command:</p>
<pre><code>kubectl delete --all pods --namespace=foo
</code></pre>
<p>You can also delete all deployments in namespace which will delete all pods attached with the deployments corresponding to the namespace</p>
<pre><code>kubectl delete --all deployments --namespace=foo
</code></pre>
<p>You can delete all namespaces and every object in every namespace (but not un-namespaced objects, like nodes and some events) with this command:</p>
<pre><code>kubectl delete --all namespaces
</code></pre>
<p>However, the latter command is probably not something you want to do, since it will delete things in the kube-system namespace, which will make your cluster not usable.</p>
<p>This command will delete all the namespaces except kube-system, which might be useful:</p>
<pre><code>for each in $(kubectl get ns -o jsonpath=&quot;{.items[*].metadata.name}&quot; | grep -v kube-system);
do
  kubectl delete ns $each
done
</code></pre>
