Site icon installvirtual

Kubectl remove pod

In this article, I will show how to remove a pod using kubectl. It’s super easy to delete or remove the pod in Kubernetes kubectl.

If you want to delete the pod, you can run this command:

kubectl delete -n default pod <pod-name>

Read also: Increase the size of the persistent volume (PV) in Kubernetes

How to remove the pod

To delete the pod without delay you can use the following command.

kubectl delete -n default pod <pod-name> --now

List all the pod

You can use the following command to list all the pods in all the namespaces.

kubectl get pods -A

List all the nodes

You can use the following command to list all the nodes.kubectl get nodes

 List all pods in ps output format with more information (such as node name).

You can use the following command to list all the nodes with information.

kubectl get nodes -o wide

Exit mobile version