-
Notifications
You must be signed in to change notification settings - Fork 779
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
Kubelite keeps restart with "key failed with : missing content for serving cert" #4296
Comments
Hi @movsb I see the following line constantly appearing in the logs of the This typically happens when the networking configuration of the host is fluctuating. If there is nothing you can think about, can you check whether the following fixes your issues?
This would prevent MicroK8s from constantly refreshing the certificates, therefore avoid constantly restarting the K8s services. |
@neoaggelos Many many thanks! After two days of observation, microk8s never crashes again. When you said that the networking configuration of my host is fluctuating, may I know what is that? Something like IP changing, or interface up and down? And, what's the impact of no-cert-reissue? |
Hi @movsb Indeed, that could be an IP address that changes on the host. Hard to tell without more information. MicroK8s watches for these changes to refresh the kube-apiserver certificates so that they include all IP addresses from the host. |
Hi @neoaggelos , I found that almost all my interfaces' IP addresses (even those from Docker containers) are listed under As a single-node cluster, should I just make the |
Hi @movsb, sorry for missing this.
This might become problematic if the node changes its IP address (e.g. DHCP gives out a different one after rebooting). The easiest way approach would be to create the
|
@neoaggelos It's ok, no worry.
It'll be OK since this is a crucial node that I've already bound its MAC with a static IP address on my router DHCP. I just wanted to let you know that I'm going to close this issue as solved. BTW, I didn't find this solution at https://microk8s.io/docs/troubleshooting. 😊 |
Unexpected MicroK8s Restart Despite Update and Certificate Lock Controls We are using static IP for this single node microk8s node. snap refresh --hold microk8s When Snap attempts to renew MicroK8s certificates: touch /var/snap/microk8s/current/var/lock/no-cert-reissue However, despite these measures, we still experienced a restart today. Upon reviewing the logs, it appears that Snap attempted to renew the certificates, but the lock file successfully prevented this. Despite this, the restart still occurred. Below are relevant syslogs at the time of the incident snapd[1595379]: storehelpers.go:923: cannot refresh: snap has no updates available: "certbot", "lxd", "microk8s", "snapd" microk8s.daemon-apiserver-kicker[966207]: /snap/microk8s/7231/actions/common/utils.sh: line 586: /snap/microk8s/7231/usr/bin/gawk: No such file or directory |
Summary
Pods periodically restart with Status Unknown → Running → Unknown. Kubelte Events says Pod SandBox changed, will recreate it. What I saw is that from the
ps
command output, kubelite crashes again and again.Below are some
journalctl -f -u snap.microk8s.daemon-kubelite.service
logs:If I
cat
those certs files, they do have contents.I'm not pretty sure if this is the reason why kubelite keeps crashing and the Pods get Status Unknown.
What Should Happen Instead?
kubelite
shouldn't crash.Reproduction Steps
No precise way to reproduce.
Introspection Report
inspection-report-20231109_181304.tar.gz
Can you suggest a fix?
Are you interested in contributing with a fix?
yes.
The text was updated successfully, but these errors were encountered: