JamesTurland / JimsGarage

Homelab Goodies
2.16k stars 482 forks source link

k3s.sh script not working on Jammy ? #39

Closed R-Nabil closed 6 months ago

R-Nabil commented 11 months ago

I've tried to use the latest version of the script and i'm getting few errors. The main one being that the script hangs on this line :

while [[ $(kubectl get pods -l app=nginx -o 'jsonpath={..status.conditions[?(@.type=="Ready")].status}') != "True" ]]; do sleep 1 done

Any idea how to debug/help improve the script ? Happy to help

This is what I get from my kubectl get nodes


╰─➤  kubectl get nodes
E1220 16:26:41.114483    3859 memcache.go:287] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request
E1220 16:26:41.122258    3859 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request
E1220 16:26:41.124219    3859 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request
E1220 16:26:41.125862    3859 memcache.go:121] couldn't get resource list for metrics.k8s.io/v1beta1: the server is currently unable to handle the request
NAME            STATUS     ROLES                       AGE     VERSION
k3s-master-01   Ready      control-plane,etcd,master   7m31s   v1.26.10+k3s2
k3s-master-02   NotReady   control-plane,etcd,master   7m14s   v1.26.10+k3s2
k3s-master-03   Ready      control-plane,etcd,master   6m57s   v1.26.10+k3s2
k3s-worker-01   Ready      <none>                      6m49s   v1.26.10+k3s2
k3s-worker-02   Ready      <none>                      6m40s   v1.26.10+k3s2
dennis-si commented 8 months ago

I have the same issue as above. @R-Nabil hey where you able to move forward with this? Update - Just notice the hard drive space was low when looking at dmesg, was set to 2gb, so after deleting the vms and creating new one with more space, was able to run the script without error

Ricardowec51 commented 6 months ago

Yes, it is .. I was doing it on VMware. Had to change Kubernetes version and kube-vip as well