canonical / microk8s

MicroK8s is a small, fast, single-package Kubernetes for datacenters and the edge.
https://microk8s.io
Apache License 2.0
8.52k stars 772 forks source link

microk8s doesnt work on raspberry pi 4 #2801

Closed fogost closed 1 year ago

fogost commented 2 years ago

microk8s starting without any error on my raspberry pi 4 model B but i cant run any deployment they just failing. I tried to create deployment on pure microk8s cluster just after microk8s start

microk8s kubectl create deployment microbot --image=dontrebootme/microbot:v1 and after that deployment always will be ContainerCreating

ubuntu@ubuntu
[inspection-report-20211217_121956.tar.gz](https://github.com/ubuntu/microk8s/files/7735076/inspection-report-20211217_121956.tar.gz)
:/$ microk8s kubectl get all --all-namespaces
I1217 12:18:36.413676 1009311 request.go:665] Waited for 1.040131276s due to client-side throttling, not priority and fairness, request: GET:https://127.0.0.1:16443/apis/authentication.k8s.io/v1?timeout=32s
I1217 12:18:47.814228 1009311 request.go:665] Waited for 1.193565394s due to client-side throttling, not priority and fairness, request: GET:https://127.0.0.1:16443/apis/node.k8s.io/v1?timeout=32s
I1217 12:18:58.014018 1009311 request.go:665] Waited for 5.192930846s due to client-side throttling, not priority and fairness, request: GET:https://127.0.0.1:16443/apis/flowcontrol.apiserver.k8s.io/v1beta1?timeout=32s
I1217 12:19:08.213695 1009311 request.go:665] Waited for 2.992738325s due to client-side throttling, not priority and fairness, request: GET:https://127.0.0.1:16443/apis/storage.k8s.io/v1?timeout=32s
I1217 12:19:18.814223 1009311 request.go:665] Waited for 1.193572404s due to client-side throttling, not priority and fairness, request: GET:https://127.0.0.1:16443/apis/policy/v1beta1?timeout=32s
NAMESPACE     NAME                                           READY   STATUS              RESTARTS        AGE
kube-system   pod/calico-kube-controllers-69d7f794d9-79dsm   0/1     Terminating         0               138m
kube-system   pod/calico-node-fzsfs                          0/1     Pending             0               73m
kube-system   pod/calico-kube-controllers-69d7f794d9-qwj7n   0/1     ContainerCreating   0               73m
default       pod/microbot-5f5499d479-vvrtt                  0/1     ContainerCreating   0               31m
kube-system   pod/calico-node-q7rbz                          0/1     CrashLoopBackOff    21 (3m7s ago)   73m

NAMESPACE   NAME                       TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)        AGE
default     service/kubernetes         ClusterIP   10.152.183.1     <none>        443/TCP        76m
default     service/microbot-service   NodePort    10.152.183.205   <none>        80:31055/TCP   31m

NAMESPACE     NAME                         DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR            AGE
kube-system   daemonset.apps/calico-node   2         2         0       2            0           kubernetes.io/os=linux   74m

NAMESPACE     NAME                                      READY   UP-TO-DATE   AVAILABLE   AGE
kube-system   deployment.apps/calico-kube-controllers   0/1     1            0           74m
default       deployment.apps/microbot                  0/1     1            0           31m

NAMESPACE     NAME                                                 DESIRED   CURRENT   READY   AGE
kube-system   replicaset.apps/calico-kube-controllers-69d7f794d9   1         1         0       73m
default       replicaset.apps/microbot-5f5499d479                  1         1         0       31m

inspection-report-20211217_121956.tar.gz

balchua commented 2 years ago

Looks like you are on Ubuntu 21.10 You need to install some other packages.

The excerpt below was taken from Microk8s guide https://microk8s.io/docs/troubleshooting then look out for the following

Calico controller fails on Raspberry Pi with Ubuntu 21.10

Extra kernel modules are needed on RPi after upgrading to Ubuntu 21.10. Install those with sudo apt install linux-modules-extra-raspi. You may need to restart MicroK8s afterwards.

madalinignisca commented 2 years ago

I would confirm on the extra modules needed. Wondering why isn't Ubuntu including them by default in the rpi4 image.

fogost commented 2 years ago

But I installed kernel modules before microk8s. Any other ideas?

balchua commented 2 years ago

@fogost did you try doing sudo snap remove microk8s --purge and then install a fresh microk8s?

blackliner commented 2 years ago

Ok, still required with ubuntu 22.04 on a Raspi4B. sudo apt-get -y install linux-modules-extra-raspi Calico came up right during the install of the new kernel module, now reboot or purge required 🎉

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.