Welcome to the Linux Foundation Forum!

kubeadm init hangs

I'm just following the first lab to get it all installs and it hangs at the init stage:

root@ubuntu01:~# kubeadm init --config=kubeadm-config.yaml --upload-certs
[init] Using Kubernetes version: v1.26.1
[preflight] Running pre-flight checks
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'

I'm running it on a Vmware with 32GB mem, 8CPU and ubuntu 22.04. I am behind a proxy though that is configured correctly and everything has worked until this point.

root@ubuntu01:~# env | grep proxy
no_proxy=10.8../24,10.96.0.0/12,127.0.0,192.168.0.0/16
https_proxy=http://****************:8080
http_proxy=http://*****************:8080

Containerd is up and running:

root@ubuntu01:~# systemctl status containerd
● containerd.service - containerd container runtime
Loaded: loaded (/lib/systemd/system/containerd.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2023-08-24 12:06:32 UTC; 6min ago
Docs: https://containerd.io

Kubelet is not:

root@ubuntu01:~# systemctl status kubelet
● kubelet.service - kubelet: The Kubernetes Node Agent
Loaded: loaded (/lib/systemd/system/kubelet.service; enabled; vendor preset: enabled)
Drop-In: /etc/systemd/system/kubelet.service.d
└─10-kubeadm.conf
Active: activating (auto-restart) (Result: exit-code) since Thu 2023-08-24 12:13:10 UTC; 7s ago

Any ideas?

Comments

  • chrispokorni
    chrispokorni Posts: 2,376

    Hi @snoop2048,

    The VM seems to have more than enough CPU and RAM for the lab. Any firewall for the lab VMs should allow inbound traffic from all sources, all protocols to all ports.
    The OS however, may cause some issues. Ubuntu 22.04 LTS may have some dependency requirements which that are not yet included in the lab. That is why the recommended release is 20.04 LTS.

    The init does take a few minutes though. After how much time did it hang and what was the last message it displayed? Any errors or warnings?

    Regards,
    -Chris

  • It hangs permanently - I will rebuild to 20.04 anyway as don't really want to hit other issues if there are potential compatibility issues in further labs - will report back if this persists.

  • Execute this command... "kubeadm config images pull"

    It can be firewall issue, where its not able to download the images needed to setup the control plane.

    If the above command goes thru, then re-execute the kubeadm init command and check, if you get additional errors, then please let us know.

Categories

Upcoming Training