Sajid Mushtaq:
how can i make a node unavailable? using kubectl drain node it marks the node Unschedulable? is it the same thing or different
Vitor Jr.:
Hi @Sajid Mushtaq, marking a node as unschedulable prevents the scheduler from placing new pods onto that Node but does not affect existing Pods on the Node.
Vitor Jr.:
Also, you may have to use the --ignore-daemonsets
and --force
options if your node has ds or single pods running.
Vitor Jr.:
Check more here, in the docs: <https://kubernetes.io/docs/tasks/administer-cluster/safely-drain-node/|Safely Drain a Node | Kubernetes>
Sajid Mushtaq:
Thanks Victor. I know how kubectl drain works. My question was that it makes the node unschedulable. If i have to make the node unavailable, is it the same thing i have to do, or for making node unavailable i have to do something else
Vitor Jr.:
If you follow this workflow, from documentation, your node won’t be able to schedule more pods, so, yes.
Sajid Mushtaq:
hmm. but are you aware of any way to make the node status UnAvailable
Vitor Jr.:
There isn’t this particular term, UnAvailable for nodes as a status, in the official k8s documentation. If you stop a node from receiving pods, you can assume that it is not available for pods anymore. If it’s not Available you also can take that it’s UnAvailable. For example, in a maintenance scenario, you can see here in this sentence:
Sajid Mushtaq:
Thanks. Yea. i couldnt find this specific term UnAvailable. But its used in some practise questions. so a bit confusing
Vitor Jr.:
It’s more about interpreting the question than the term itself
Sajid Mushtaq:
yea. thanks for looking into this.
Vitor Jr.:
np