Upon installation on a fresh ubuntu system, I could not get the daemon-kubelet to start.
Mar 21 16:56:09 to_the_moon microk8s.daemon-kubelet[22979]: E0321 16:56:09.296705 22979 kubelet.go:2266] node "to_the_moon" not found
Mar 21 16:56:09 to_the_moon microk8s.daemon-kubelet[22979]: E0321 16:56:09.397054 22979 kubelet.go:2266] node "to_the_moon" not found
Mar 21 16:56:09 to_the_moon microk8s.daemon-kubelet[22979]: E0321 16:56:09.497314 22979 kubelet.go:2266] node "to_the_moon" not found
Mar 21 16:56:09 to_the_moon microk8s.daemon-kubelet[22979]: E0321 16:56:09.597602 22979 kubelet.go:2266] node "to_the_moon" not found
microk8s.status returns: microk8s is not running. Use microk8s.inspect for a deeper inspection.
Hi @lxjhk
There are a few reasons why this might be happening, but I cannot say for sure right now. Could you run a microk8s.inspect and attach here the tarball produced? I wonder what is special about you setup. "to_the_moon" is your hostname, right? You can access local services through that, right? How does your /etc/hosts/ look like?
Thanks
I was experiencing this issue in combination with #375 and #198. The workaround I found was just to move the service I had already listening on port 8080 and reinstall.
Can you help? Same issue.
Change your hostname.
Your hostname to_the_moon contains invalid underscore character.
Rename your hostname to to-the-moon and Run microk8s.reset again should be fine.
This is something we could detect on the microk8s.inspect script and offer a warning (https://github.com/ubuntu/microk8s/blob/master/scripts/inspect.sh).
We could detect such hostnames in the configure hook https://github.com/ubuntu/microk8s/blob/master/snap/hooks/configure and use the --hostname-override argument of kubelet to provide a valid node name.
Maybe just add
function check_hostname {
if [[ "$(hostname)" =~ "_" ]]; then
printf -- '\033[31m FAIL: \033[0m Hostname %s contains invalid underscore characters \n' "$(hostname)"
fi
}
Change your hostname.
Every time I change the hostname of the base OS after microk8s is installed, it completely breaks microk8s.
user@time-buddy:~$ sudo snap refresh microk8s --channel=1.15/stable --classic
microk8s (1.15/stable) v1.15.9 from Canonical✓ refreshed
user@time-buddy:~$ kubectl get nodes
NAME STATUS ROLES AGE VERSION
clock-buddy NotReady <none> 45h v1.15.9
time-buddy Ready <none> 45h v1.15.10
user@time-buddy:~$ microk8s.reset
Calling clean_cluster
Error from server (Conflict): Operation cannot be fulfilled on namespaces "ingress-nginx": The system is ensuring all content is removed from this namespace. Upon completion, this namespace will automatically be purged by the system.
Most helpful comment
Every time I change the hostname of the base OS after microk8s is installed, it completely breaks microk8s.