innobead / kubefire

KubeFire 🔥, creates and manages Kubernetes Clusters using Firecracker microVMs
Apache License 2.0
480 stars 36 forks source link

kubeadm bootstrapping, taint "node-role.kubernetes.io/master" not found #75

Closed aoshfan closed 1 year ago

aoshfan commented 1 year ago

Describe the bug Error show error: taint "node-role.kubernetes.io/master" not found after i run $ kubefire cluster create demo --bootstrapper=kubeadm

To Reproduce N/A

Expected behavior No error

Environment

Additional context Below showing it running successfully, but i'm not sure why i got above error.

root@ubuntu:/home/aoshfan/firecracker# kubefire cluster show demo
====== Cluster Configuration ======
NAME    BOOTSTRAPPER    IMAGE                                           KERNELIMAGE                                            
demo    kubeadm         ghcr.io/innobead/kubefire-opensuse-leap:15.2    ghcr.io/innobead/kubefire-ignite-kernel:4.19.125-amd64  

====== Master Node Configuration ======
COUNT   MEMORY  CPUS    DISKSIZE 
1       2GB     2       10GB        

====== Worker Node Configuration ======
COUNT   MEMORY  CPUS    DISKSIZE 
0       2GB     2       10GB        

====== Node Runtime ======
NAME            RUNNING IPADDRESSES 
demo-master-1   true    10.62.0.5   
innobead commented 1 year ago

https://github.com/kubernetes/kubernetes/pull/107533

Thanks for this update, this is due to the old taint having been removed but node-role.kubernetes.io/control-plane is used by default now.

innobead commented 1 year ago

Fixed in 0.3.9

aoshfan commented 1 year ago

Thank you for the fix @innobead , but when i try a new version (0.3.9) i got below issue of dependencies.

I believe because GLIBC_2.32 is not available for Ubuntu 20 & below.

Maybe issue happen because build on ubuntu-latest ?

aoshfan@ubuntu:~$ kubefire-0.39 
kubefire-0.39: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by kubefire-0.39)
kubefire-0.39: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by kubefire-0.39)

btw, should i create a new issue for this error ?

innobead commented 1 year ago

It should be related to that dynamic dependencies. I will check this later and thanks for the update 👍. No need to create another issue.

aoshfan commented 1 year ago

Thank you & noted.

innobead commented 1 year ago

Thank you & noted.

Please try v0.3.10. It should work now without glibc dependencies since CGO is disabled.

Installed executables:
 - /home/davidko/.huber/bin/kubefire
kubefire (version: v0.3.9, source: github) to kubefire (version: v0.3.10, source: github) updated
❯ which kubefire
/home/davidko/.huber/bin/kubefire
❯ ldd -v /home/davidko/.huber/bin/kubefire
    not a dynamic executable
❯ kubefire cluster delete demo
INFO[2023-04-16T08:23:45+08:00] deleting cluster                              cluster=demo force=false
INFO[2023-04-16T08:23:45+08:00] deleting master nodes                         cluster=demo
INFO[2023-04-16T08:23:45+08:00] deleting node                                 node=demo-master-1
INFO[2023-04-16T08:23:45+08:00] time="2023-04-16T08:23:45+08:00" level=info msg="Removing the container with ID \"ignite-170d0d140f54fb41\" from the \"cni\" network" 
INFO[2023-04-16T08:23:45+08:00] time="2023-04-16T08:23:45+08:00" level=info msg="Removed VM with name \"demo-master-1\" and ID \"170d0d140f54fb41\"" 
INFO[2023-04-16T08:23:46+08:00] deleting worker nodes                         cluster=demo
INFO[2023-04-16T08:23:46+08:00] deleting cluster configurations               cluster=demo
❯ kubefire version
Version: v0.3.10
Build: 35cb33b-20230416001838
❯ kubefire cluster create demo
INFO[2023-04-16T08:24:00+08:00] getting the cri-tools release versions info less than/equal to v1.27.1  bootstrapper=kubeadm
INFO[2023-04-16T08:24:01+08:00] getting the latest kube release tool release version info  bootstrapper=kubeadm
INFO[2023-04-16T08:24:02+08:00] initializing cluster configuration            cluster=demo
INFO[2023-04-16T08:24:02+08:00] saving cluster configurations                 cluster=demo
INFO[2023-04-16T08:24:02+08:00] creating cluster                              cluster=demo
INFO[2023-04-16T08:24:02+08:00] creating master nodes of cluster              cluster=demo started=true
INFO[2023-04-16T08:24:02+08:00] creating node                                 node=demo-master-1
INFO[2023-04-16T08:24:03+08:00] time="2023-04-16T08:24:03+08:00" level=info msg="Created VM with ID \"d609bdfe4b6a56be\" and name \"demo-master-1\"" 
INFO[2023-04-16T08:24:04+08:00] time="2023-04-16T08:24:04+08:00" level=info msg="Networking is handled by \"cni\""
time="2023-04-16T08:24:04+08:00" level=info msg="Started Firecracker VM \"d609bdfe4b6a56be\" in a container with ID \"ignite-d609bdfe4b6a56be\"" 
INFO[2023-04-16T08:24:05+08:00] waiting nodes of cluster running              cluster=demo
INFO[2023-04-16T08:24:05+08:00] initializing cluster                          cluster=demo
INFO[2023-04-16T08:24:05+08:00] initializing node                             node=demo-master-1
INFO[2023-04-16T08:24:05+08:00] waiting all nodes initialization finished    
...
INFO[2023-04-16T08:25:52+08:00] saving cluster configurations                 cluster=demo
INFO[2023-04-16T08:25:52+08:00] downloading the kubeconfig of cluster (demo) 
INFO[2023-04-16T08:25:52+08:00] saved the kubeconfig of cluster (demo) to /home/davidko/.kubefire/clusters/demo/admin.conf 
❯ export `kubefire cluster env demo`
❯ k get nodes
NAME            STATUS     ROLES           AGE   VERSION
demo-master-1   NotReady   control-plane   18s   v1.27.1
aoshfan commented 1 year ago

Working fine now, thank you for your fast respond & fixes :smile: .

Now i could start a new adventure.

INFO[2023-04-16T12:22:00+08:00] running KUBECONFIG=/etc/kubernetes/admin.conf kubectl taint nodes --all node-role.kubernetes.io/control-plane-  node=demo-master-1 
INFO[2023-04-16T12:22:00+08:00] untainting the control plane node             node=demo-master-1
INFO[2023-04-16T12:22:00+08:00] 10.62.0.8:22: node/demo-master-1 untainted   
INFO[2023-04-16T12:22:01+08:00] saving cluster configurations                 cluster=demo
INFO[2023-04-16T12:22:01+08:00] downloading the kubeconfig of cluster (demo) 
INFO[2023-04-16T12:22:02+08:00] saved the kubeconfig of cluster (demo) to /root/.kubefire/clusters/demo/admin.conf