mmumshad / kubernetes-the-hard-way

Bootstrap Kubernetes the hard way on Vagrant on Local Machine. No scripts.
Apache License 2.0
4.6k stars 4.48k forks source link

CrashLoopBackOff error on the Weave Net #321

Closed hashirph closed 7 months ago

hashirph commented 1 year ago

The Core DNS update is not working and the weave networking also seems not working.

vagrant@master-1:~$ kubectl get pods -n kube-system NAME READY STATUS RESTARTS AGE coredns-6f4b4bd8fb-gkgpl 0/1 ContainerCreating 0 24h coredns-6f4b4bd8fb-pf2jz 0/1 ContainerCreating 0 24h weave-net-jhzs7 1/2 CrashLoopBackOff 144 (118s ago) 39h weave-net-wxk9r 1/2 CrashLoopBackOff 143 (45s ago) 39h

vagrant@master-1:~$ kubectl logs weave-net-jhzs7 -n kube-system Defaulted container "weave" out of: weave, weave-npc, weave-init (init) FATA: 2023/07/05 05:09:36.639718 [kube-peers] Could not get peers: Get "https://10.96.0.1:443/api/v1/nodes": dial tcp 10.96.0.1:443: i/o timeout Failed to get peers

asdasdqqq commented 1 year ago

I have encountered the same problem.

kubectl logs weave-net-gscrg -n kube-system returned the following error:

Defaulted container "weave" out of: weave, weave-npc, weave-init (init)
FATA: 2023/09/01 07:32:44.454828 [kube-peers] Could not get peers: Get "https://10.96.0.1:443/api/v1/nodes": dial tcp 10.96.0.1:443: i/o timeout
Failed to get peers

Afterwards, I checked my Ubuntu image and discovered that I made a mistake. This issue occurred because I used Proxmox and mistakenly selected the wrong image.

Fortunately, I replaced the incorrect image with the correct one, and now everything is functioning normally.

The correct Ubuntu image I used is:

fireflycons commented 7 months ago

Hello @hashirph The instructions in this lab have not changed since it was last tested. You have most likely made an error in one of the previous steps - check what it says about that in this section https://github.com/mmumshad/kubernetes-the-hard-way#kubernetes-the-hard-way-on-virtualbox

@asdasdqqq Gald you got it to work on proxmox. It should work on any hypervisor, however the instructions here only detail how to configure a VirtualBox network. We couldn't really cover every possible hypervisor solution.