Deleting Nodes from Cluster

Guide to delete nodes from existing Kubernetes cluster

The steps to delete nodes from Kubernetes cluster are:

  • Before you delete the node, make sure the PodDisruptionBudget is set to "0" on deleting node. Click here for more information.

  • To drain the node from the cluster, run the command below.

    kubectl drain <nodename> --ignore-daemonsets --delete-emptydir-data
  • Once done draining the node, run the command below to delete it from the cluster.

    kubectl delete node <nodename>
  • After deleting the node, check your Kubernetes cluster to ensure the node has been deleted.

  • Make sure the node IP is removed from the LoadBalancer/NGINX to avoid intermittent issues in the environment.

Last updated

Logo

Copyright © OpenG2P. This work is licensed under Creative Common Attribution (CC-BY-4.0) International license unless otherwise noted.