Forum Navigation
You need to log in to create posts and topics.

Remove Worker node from Kubernetes Cluster

Problem

User wants to remove worker node from the cluster for maintenance

Solution

# List the nodes and get the <node-name> you want to remove from cluster

kubectl get nodes

# Drain the node

kubectl drain <node-name>

 

# If you want to completely remove data from the node

kubectl drain <node-name> –ignore-daemonsets –delete-local-data –force

# Delete the node

kubectl delete node <node-name>

Uploaded files: