Skip to content

A pod stuck in Error status can't be deleted — kubectl delete pod <name> reports it can't find the pod, even though kubectl get pods clearly shows it running/errored in that namespace.

Answer

Specify the namespace explicitly on the delete command — kubectl delete pod <podname> -n <namespace> — since without -n, kubectl looks in the default namespace rather than the one the pod actually belongs to, which is why it reports the pod as not found even though it's clearly listed when you query with the namespace included (or -A for all namespaces).

← Browse Developer Studio, deployment, and upgrades questions