k0sproject / k0s

k0s - The Zero Friction Kubernetes
https://docs.k0sproject.io
Other
3.68k stars 362 forks source link

More procedure about role swapping #4051

Open stevefan1999-personal opened 8 months ago

stevefan1999-personal commented 8 months ago

Is your feature request related to a problem? Please describe.

I have a controller+worker node that is overwhelmed and want it to be served as controller only. Right now, I have to risk destroying the cluster again for that to work out.

Describe the solution you would like

Give us a more comprehensive procedure about how to swap roles

Describe alternatives you've considered

Just keep it as is, but forcefully taint that specific node with NoExecute

Additional context

No response

jnummelin commented 8 months ago

The procedure should be something like:

  1. Cordon the node
  2. drain the node
  3. stop k0s on the node; if using systemd enabled OS: systemctl stop koscontroller
  4. Edit the systemd unit at /etc/systemd/system/k0scontroller.service: remove the --enable-worker and other worker related opts
  5. systemctl start k0scontroller
  6. Remove the related node object in k8s api