carlosedp / riscv-bringup

Risc-V journey thru containers and new projects
270 stars 43 forks source link

Kubelet failed when running Kubeadm #16

Closed maiquanghiep closed 3 years ago

maiquanghiep commented 3 years ago

I'm using the QEmu Ubuntu RISC-V image to start the Kubernetes cluster with Golang and docker installed. When following this guide https://github.com/carlosedp/riscv-bringup/tree/master/kubernetes and init the cluster, it stuck in starting Kubelet. The error message from Kubelet is :

Apr 26 02:49:08 ubuntu kubelet[615827]: F0426 02:49:08.968184 615827 server.go:271] failed to run Kubelet: could not detect clock speed from output: "processor\t: 0\nhart\t\t: 3\nisa\t\t: rv64imafdcsu\nmmu\t\t: sv48\n\nprocessor\t: 1\nhart\t\t: 0\nisa\t\t: rv64imafdcsu\nmmu\t\t: sv48\n\nprocessor\t: 2\nhart\t\t: 1\nisa\t\t: rv64imafdcsu\nmmu\t\t: sv48\n\nprocessor\t: 3\nhart\t\t: 2\nisa\t\t: rv64imafdcsu\nmmu\t\t: sv48\n\n" Apr 26 02:49:09 ubuntu systemd[1]: kubelet.service: Main process exited, code=exited, status=255/EXCEPTION Apr 26 02:49:09 ubuntu systemd[1]: kubelet.service: Failed with result 'exit-code'.

I checked the code to read clock speed here which leads to /proc/cpuinfo file. It seems like lots of CPU information is missing. I only got:

ubuntu@ubuntu:~$ cat /proc/cpuinfo processor : 0 hart : 3 isa : rv64imafdcsu mmu : sv48

processor : 1 hart : 0 isa : rv64imafdcsu mmu : sv48

carlosedp commented 3 years ago

I have to look into the Kubelet patches since some things changed in latest versions. If you want to try, get K3s from https://github.com/carlosedp/riscv-bringup/releases/download/v1.0/k3s-v1.20.4-k3s1-riscv64.tar.gz.