Forrest logo
back to the kubectl tool

kubectl-delete:tldr:3445e

kubectl-delete: Delete a specific node.
$ kubectl delete node ${node_name}
try on your machine

The command "kubectl delete node ${node_name}" is used to delete a node from a Kubernetes cluster.

Here's how it works:

  • "kubectl" is the command-line tool used to interact with a Kubernetes cluster.
  • "delete" is the command used to delete resources in Kubernetes.
  • "node" specifies that we want to delete a node from the cluster.
  • "${node_name}" is a placeholder for the actual name of the node that you want to delete. You need to replace "${node_name}" with the name of the specific node you want to delete.

When you execute this command, Kubernetes will remove the specified node from the cluster. This will result in the pods running on that node being rescheduled to other available nodes in the cluster to maintain high availability.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the kubectl tool