-
Notifications
You must be signed in to change notification settings - Fork 772
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
microk8s is not running - on a 4 node Rasp Pi 3 B+ cluster #4449
Comments
Hi @steentottrup, The error in the logs causing k8s to crashloop is:
I think you are missing |
@steentottrup did you ever get to the bottom of this? |
No, I'm no closer to a solution. I'm not really a Linux/Ubuntu expert, so I've look at the logs, but haven't found the actual problem (or solution) yet. |
I'm experiencing the same problem, but on Ubuntu 22.04. Someone else also appears to have encountered it with a clean install of the same operating system: It appears that I've been able to temporarily get the node back up by running the following: modprobe nf_conntrack |
@bartecargo that's a great spot thanks. I've been running stable on
Rebuilt microk8s on Monday @ v1.30, just happened again. Bart's modprobe resolved for me |
I can confirm the above after upgrading to microk8s 1.30/stable. Switching to 1.30/edge as suggested in #4361 does not help. The modprobe command posted in #4449 (comment), followed by The same is also outlined in this blog post and appears to be a microk8s shortcoming. If someone of the dev team sees this, they might want to investigate. |
Hi @matpen So, MicroK8s should load br_netfilter before the services start in microk8s/microk8s-resources/wrappers/run-kubelite-with-args Lines 214 to 226 in 5403f43
Would you mind sharing some logs from your machine, after the reboot? Can you check if there are any log lines like the ones shown? An inspection report would also do wonders to see what might be up. For example, I wonder if this code is running early in the boot process, then |
Hi @neoaggelos, Thank you for following up on this.
Here is a grep for Filtered logs
This being a production machine, I am hesitant in sharing more info on the open channel, but I have a slice around the time where microk8s starts which might be useful. It looks anyway like the module is loaded properly. Unfiltered logs
From the above, it looks to me like microk8s correctly loads the module. However, I am also quite confident of what I reported in #4449 (comment). The situation was as follow:
So there is a slight chance that the combination "upgrade to edge + modprobe" somehow fixed the problem. |
You can set this to be done automatically during boot sudo modprobe nf_conntrack && grep -qxF 'nf_conntrack' /etc/modules || echo 'nf_conntrack' | sudo tee -a /etc/modules |
Summary
I've just install microk8s on 4 Rasp Pi 3 B+. They were installed with Ubuntu 22.04.4 64 bit server OS.
The first 3 nodes are joined with the control plane etc. 4th node is just a worker. Node 1 boots off a USB HDD, other 3 are on SD cards.
When I try to get status, all I get back is this text:
"microk8s is not running. Use microk8s inspect for a deeper inspection."
Trying to enable dns and storage etc. fails, here the output from 'microk8s enable dns':
Traceback (most recent call last):
File "/snap/microk8s/6565/scripts/wrappers/enable.py", line 41, in
enable(prog_name="microk8s enable")
File "/snap/microk8s/6565/usr/lib/python3/dist-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/snap/microk8s/6565/usr/lib/python3/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/snap/microk8s/6565/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/snap/microk8s/6565/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/snap/microk8s/6565/scripts/wrappers/enable.py", line 37, in enable
xable("enable", addons)
File "/snap/microk8s/6565/scripts/wrappers/common/utils.py", line 470, in xable
protected_xable(action, addon_args)
File "/snap/microk8s/6565/scripts/wrappers/common/utils.py", line 498, in protected_xable
unprotected_xable(action, addon_args)
File "/snap/microk8s/6565/scripts/wrappers/common/utils.py", line 514, in unprotected_xable
enabled_addons_info, disabled_addons_info = get_status(available_addons_info, True)
File "/snap/microk8s/6565/scripts/wrappers/common/utils.py", line 566, in get_status
kube_output = kubectl_get("all,ingress")
File "/snap/microk8s/6565/scripts/wrappers/common/utils.py", line 248, in kubectl_get
return run(KUBECTL, "get", cmd, "--all-namespaces", die=False)
File "/snap/microk8s/6565/scripts/wrappers/common/utils.py", line 69, in run
result.check_returncode()
File "/snap/microk8s/6565/usr/lib/python3.8/subprocess.py", line 448, in check_returncode
raise CalledProcessError(self.returncode, self.args, self.stdout,
subprocess.CalledProcessError: Command '('/snap/microk8s/6565/microk8s-kubectl.wrapper', 'get', 'all,ingress', '--all-namespaces')' returned non-zero exit status 1.
What Should Happen Instead?
No errors when I joined the nodes together, so I was hoping everything was working and I could start putting workloads/services in the cluster.
Reproduction Steps
I've installed the microk8s a few times now, first on 2 nodes, and latest on 4 to see if the number og nodes was the issue. Same thing every time.
This is what I'm doing on the freshly install Ubuntu 22.04.4:
sudo apt update && sudo apt upgrade -y && sudo reboot
sudo nano /boot/firmware/cmdline.txt
Adding 'cgroup_enable=memory cgroup_memory=1' to the file
sudo apt install linux-modules-extra-raspi
sudo snap install microk8s --classic
sudo usermod -a -G microk8s rasppi
sudo chown -f -R rasppi ~/.kube
microk8s status --wait-ready
The last command seems to never return/end.
Introspection Report
Inspecting system
Inspecting Certificates
Inspecting services
Service snap.microk8s.daemon-cluster-agent is running
Service snap.microk8s.daemon-containerd is running
Service snap.microk8s.daemon-kubelite is running
Service snap.microk8s.daemon-k8s-dqlite is running
Service snap.microk8s.daemon-apiserver-kicker is running
Copy service arguments to the final report tarball
Inspecting AppArmor configuration
Gathering system information
Copy processes list to the final report tarball
Copy disk usage information to the final report tarball
Copy memory usage information to the final report tarball
Copy server uptime to the final report tarball
Copy openSSL information to the final report tarball
Copy snap list to the final report tarball
Copy VM name (or none) to the final report tarball
Copy current linux distribution to the final report tarball
Copy asnycio usage and limits to the final report tarball
Copy inotify max_user_instances and max_user_watches to the final report tarball
Copy network configuration to the final report tarball
Inspecting kubernetes cluster
Inspect kubernetes cluster
Inspecting dqlite
Inspect dqlite
Building the report tarball
Report tarball is at /var/snap/microk8s/6565/inspection-report-20240303_075153.tar.gz
inspection-report-20240303_075153.tar.gz
The text was updated successfully, but these errors were encountered: