Removing nodes
The gke-kubectl-lab-default-pool-b3c7050d-8jhj
node got drained and is not running any deployments, pods, or StatefulSets, so it can be easily deleted now.
We do it using the delete node
command:
$ kubectl delete node gke-kubectl-lab-default-pool-b3c7050d-8jhj
We delete the node using the preceding command. The output of this command is as shown in the following screenshot:
As you can see from the kubectl get nodes
output, the node was unregistered from the Kubernetes API and got deleted.
Important note
Actual node deletion depends on your Kubernetes setup. In cloud-hosted clusters, the node gets unregistered and deleted, but if you are running an on-premise self-hosted Kubernetes cluster, the actual node will not be deleted but only deregistered from the Kubernetes API.
Also, when you specify the cluster size in the cloud setup, the new node will replace the deleted one after some time.
...