Thursday, March 23, 2023

Steps to delete a worker node in Openshift/Kubernetes

 
// get all the nodes to select your  node
oc get nodes

Here, we selected the node ocp4.myworkernode.here 


// cordon the node - no more scheduling to this node
oc adm cordon ocp4.myworkernode.here 
 

// drain the node - remove all pods/resources from the node
oc adm drain ocp4.myworkernode.here  --force --delete-emptydir-data --ignore-daemonsets
 
 
// Now, final step delete the node
oc delete node ocp4.myworkernode.here 
 
 
PS: Use 'kubectl' instead of oc in case of Kubernetes  

No comments:

Post a Comment