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

Prevent kubelet from starting before the elementalhost has been bootstrapped #77

Open
anmazzotti opened this issue Jul 1, 2024 · 0 comments

Comments

@anmazzotti
Copy link
Collaborator

As reported by @juadk , the Kubeadm-ready ISO has kubelet starting before the host has been bootstrapped, this results in the following error:

Jul 01 09:20:30 node-001 systemd[1]: kubelet.service: Scheduled restart job, restart counter is at 71.
Jul 01 09:20:30 node-001 systemd[1]: Stopped kubelet: The Kubernetes Node Agent.
Jul 01 09:20:30 node-001 systemd[1]: Started kubelet: The Kubernetes Node Agent.
Jul 01 09:20:30 node-001 kubelet[2251]: E0701 09:20:30.106145    2251 run.go:74] "command failed" err="failed to load kubelet config file, path: /var/lib/kubelet/config.yaml, error: failed to load Kubelet config file /var/lib/kubelet/config.yaml, error failed to read kubelet config file \"/var/lib/kubelet/config.yaml\", error: open /var/lib/kubelet/config.yaml: no such file or directory"
Jul 01 09:20:30 node-001 systemd[1]: kubelet.service: Main process exited, code=exited, status=1/FAILURE
Jul 01 09:20:30 node-001 systemd[1]: kubelet.service: Failed with result 'exit-code'.

Theoretically this can be ignored, kubeadm will start the service again during the pre-flight checks, but it's nice to suppress it.

Having a condition on the custom systemd service file to check on /var/lib/kubelet/config.yaml existance should be sufficient.

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

No branches or pull requests

1 participant