Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to change a single node cluster into a multi-node one #4122

Open
Weaverzhu opened this issue Feb 24, 2024 · 2 comments
Open

how to change a single node cluster into a multi-node one #4122

Weaverzhu opened this issue Feb 24, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@Weaverzhu
Copy link

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

joining a worker node to an existing cluster running creating token failed.

#1284 k0s seems to forbidden a single node cluster adding a worker.

Describe the solution you would like

No response

Describe alternatives you've considered

is there anyway besides creating a compeletely new cluster?

Additional context

No response

@Weaverzhu Weaverzhu added the enhancement New feature or request label Feb 24, 2024
@twz123 twz123 self-assigned this Feb 26, 2024
@wbo-yak
Copy link

wbo-yak commented May 6, 2024

Hi,
Any update on this ? is there an easy way to migrate from a single node to multi node ?

@wbo-yak
Copy link

wbo-yak commented May 6, 2024

Hi,
I was able to get through by updating the systemd service file.

  • Remove "single=true" flag
  • Allow controller to be a worker as well with "--enable-worker"
  • Disable taints on the controller node
  • Stop, Reload and Restart
systemctl stop k0scontroller 
systemctl daemon-reload
systemctl start k0scontroller

Original file :

[Unit]
Description=k0s - Zero Friction Kubernetes
Documentation=https://docs.k0sproject.io
ConditionFileIsExecutable=/usr/local/bin/k0s

After=network-online.target
Wants=network-online.target

[Service]
StartLimitInterval=5
StartLimitBurst=10
ExecStart=/usr/local/bin/k0s controller --config=/etc/k0s/k0s.yaml --single=true

RestartSec=120
Delegate=yes
KillMode=process
LimitCORE=infinity
TasksMax=infinity
TimeoutStartSec=0
LimitNOFILE=999999
Restart=always

[Install]
WantedBy=multi-user.target

Updated file :

[Unit]
Description=k0s - Zero Friction Kubernetes
Documentation=https://docs.k0sproject.io
ConditionFileIsExecutable=/usr/local/bin/k0s

After=network-online.target
Wants=network-online.target

[Service]
StartLimitInterval=5
StartLimitBurst=10
ExecStart=/usr/local/bin/k0s controller --config=/etc/k0s/k0s.yaml --enable-worker --no-taints

RestartSec=120
Delegate=yes
KillMode=process
LimitCORE=infinity
TasksMax=infinity
TimeoutStartSec=0
LimitNOFILE=999999
Restart=always

[Install]
WantedBy=multi-user.target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants