2

I have a GKE k8s cluster and wanted to reboot one of the nodes (a vm reboot, and not just the kubelet).

I was looking for the correct way (if there is one) than just resetting the vm directly. But I couldnt find anything in the web.

So, my plan is to use these steps:

  1. drain the node
  2. reboot

Is there a correct (other) way?

1 Answer 1

3

No, that is the correct way -- and you don't have to drain the Node first unless there is some extenuating circumstance. One of the major features of kubernetes is that it will route around the "damage" of having a Node disappear suddenly.

You could cordon the Node, if you wish to prevent future Pods from being scheduled on the soon-to-be-rebooted Node, but that's merely a time-saver, and shouldn't affect the reboot process.

Just be sure to verify the "schedulable" status of the Node after the reboot if you do use cordon or drain; I can't this very second recall whether they automatically re-register in a schedulable state.

Sign up to request clarification or add additional context in comments.

1 Comment

Thank you! however, I had to uncordon the node after reboot because I drained it first.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.