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

node-installer: k0s single node #153

Closed
vdice opened this issue Jun 28, 2024 · 1 comment · Fixed by #167
Closed

node-installer: k0s single node #153

vdice opened this issue Jun 28, 2024 · 1 comment · Fixed by #167

Comments

@vdice
Copy link
Contributor

vdice commented Jun 28, 2024

I am new to k0s but was running through the motions of installing the shim on a local k0s cluster, thanks to the support added recently in #135

I followed the k0s quickstart here and went with the easy-mode, single node k0s that includes the controller and worker functions with the default configuration

In this mode, the systemctl service is k0scontroller rather than k0sworker. The latter is used in the node-installer logic here. Therefore, shim installation fails with the following:

$ k -n kwasm logs pod/lima-shimvm-provision-kwasm-nzwz6
Failed to restart k0sworker.service: Unit k0sworker.service not found.

Here's the systemctl service I see:

$ systemctl status k0sworker
Unit k0sworker.service could not be found.
$ systemctl status k0scontroller
● k0scontroller.service - k0s - Zero Friction Kubernetes
     Loaded: loaded (/etc/systemd/system/k0scontroller.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2024-06-28 10:56:04 MDT; 8min ago
     ...

Do we want to update the node-installer logic to support this single-node scenario? Or document that a multi-node setup (i.e. with an additional worker node/systemctl service) is required? cc @Ajpantuso

@Ajpantuso
Copy link
Contributor

I think it's sensible to check if it's a worker or a controller with something like:

if systemctl list-units | grep -q k0sworker; then
...
else
...
fi

Ajpantuso added a commit to Ajpantuso/containerd-shim-spin that referenced this issue Jul 21, 2024
Ajpantuso added a commit to Ajpantuso/containerd-shim-spin that referenced this issue Jul 23, 2024
…er service when present

Signed-off-by: Andrew Pantuso <ajpantuso@gmail.com>
Ajpantuso added a commit to Ajpantuso/containerd-shim-spin that referenced this issue Jul 23, 2024
…er service when present

Signed-off-by: Andrew Pantuso <ajpantuso@gmail.com>
Ajpantuso added a commit to Ajpantuso/containerd-shim-spin that referenced this issue Jul 23, 2024
…er service when present

Signed-off-by: Andrew Pantuso <ajpantuso@gmail.com>
kate-goldenring added a commit that referenced this issue Jul 29, 2024
feat(node-installer): #153 conditionally restart k0s controller service when present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants