How To
Summary
For example, you would like to replace your current deployment node with one of your compute nodes or remove the node from the cluster entirely. How can I do that, can I take it offline without any risk of affecting something else?
Steps
To turn compute to deploy:
kubectl label no "node name" is_compute="false"
kubectl label no "node name" nodetype="deploy"
kubectl label no "node name" is_deploy="true"
kubectl label no "node name" is_compute="false"
kubectl label no "node name" nodetype="deploy"
kubectl label no "node name" is_deploy="true"
To turn deploy to compute:
kubectl label no "node name" is_compute="true"
kubectl label no "node name" nodetype="compute"
kubectl label no "node name" is_deploy="false"
kubectl label no "node name" is_compute="true"
kubectl label no "node name" nodetype="compute"
kubectl label no "node name" is_deploy="false"
To delete the node completely, you'll need to stop kubelet and docker on that node, then delete the node from the cluster so it won't start up again on that node by also disabling the services.
systemctl stop kubelet
systemctl stop docker
systemctl disable kubelet
systemctl disable docker
systemctl stop docker
systemctl disable kubelet
systemctl disable docker
kubectl delete no <node-name>
To clean up, run: kubectl get po --all-namespaces | grep 0/| awk '{system("kubectl delete pod --grace-period=0 --force -n="$1" "$2)}'
Document Location
Worldwide
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSHGWL","label":"IBM Watson Studio Local"},"Component":"","Platform":[{"code":"PF016","label":"Linux"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]
Was this topic helpful?
Document Information
Modified date:
13 March 2020
UID
ibm11168114