LF258 Unable to join worker to control plane on Lab 3.2

Answers
-
Hi @skopos,
This initial error is one of the most common issues reported in the forum, with cluster VMs running in the cloud or on local hypervisors.
The health checks seem to fail because the health check port does not accept the connection. This is typical for a firewall blocking access to that particular port. What type of infrastructure is hosting your cluster? Local hypervisor or cloud? In each case please ensure that the infrastructure level firewall allows all incoming traffic from all sources, all protocols, to all ports. In addition, the guest OS of your VM instances should have firewalls disabled.
Also, ensure that
/etc/hostsincludes the correct control plane node information.Regards,
-Chris0 -
Both VMs are hosted virtualbox.
Firewalls are disabled and interfaces are set in "promiscuous mode".
We had a meeting during office hours today.
0 -

0 -
Hi @skopos,
What is the value of the
controlPlaneEndpointfrom the kubeadm-config.yaml file, and what was the entirekubeadm joincommand used on the worker node?Also, what is the size of the worker node (CPU, mem, disk)?
Regards,
-Chris0 -

Command to join worker node:
kubeadm join --token fx8hwt.i02nwpzk3iqpesc5 kmaster:6443 --discovery-token-ca-cert-hash sha256:5de8cf806d593ce7e28ce382cb9b32fe91acf10f3a60e6f8a954469edcadc18csize of worker: 2CPU, 3GB, 12GB disk
0 -
Hi @skopos,
Thank you for the detailed output.
Occasionally, I noticed that kubelet complaining (indirectly) about the size of its nodes as well, more precisely about the available CPU and memory. Also, from our earlier conversation, I remember that we had tried to bootstrap the cluster several times on the same two VirtualBox VMs, each time with different configuration attempts.Considering the "history" of these two VMs, I would recommend a fresh install, starting with two new VirtualBox VMs. Please ensure that the control plane VM has 2 CPU cores, 4 to 8 GB of memory, 15-20 GB virtual disk, and the worker VM has 2 CPU cores, 4+ GB memory, 15-20 GB virtual disk. Each VM with one Bridged network interface, promiscuous mode - allow all, with private IP addresses assigned by the default DHCP server of VirtualBox (they will be from 192.168.x.0/24 range, no need to assign manually during the provisioning process).
After the guest OS installation (Ubuntu 20.04 LTS), please proceed with the bootstrapping steps of the Kubernetes cluster, while paying close attention to the following details:
-calico.yaml- IP range should be modified to10.200.0.0/16(to avoid overlapping IP addresses between nodes and pods)
-kubeadm-config.yaml-podSubnet: 10.200.0.0/16(to match the pod network from calico.yaml)
-kubeadm-config.yaml-controlPlaneEndpoint: "k8scp:6443"- use the alias provided in the lab guide, NOT the hostname of the control plane VM
-/etc/hosts- on both VMs, to include the private IP of the control plane VM (192.168.x.y) and the k8scp alias (if desired, it can include the hostname as well)Regards,
-Chris0 -
@skopos Hi, obviously you have an issue with kubelet on worker's node it can be seen from the first output you provided. So I would check if kubelet is running at all with the command:
systemctl status kubeletand in case it is not in Active state I would check what is wrong with it using commandjournalctl -xeu kubelet. And as @chrispokorni already noticed your nodes' subnet is overlapped with pods' subnet I would fix it as well.By the way, I had the same output from kubelet and it was related to the fact that kubelet cgroup driver was different from docker cgroup driver. You can compare them using following commands:
sudo docker info | grep "Cgroup Driver"sudo cat /var/lib/kubelet/config.yaml | grep cgroupDriver
1 -
hi @oleksazhel , yes indeed kubelet was not working.
I am redeploying the lab environment, and I will keep updating you all about the progress0 -

@chrispokorni I have reinstalled all the environment as suggested without any progress.@oleksazhel , I think you are right as the cgropdriver is different .
Which one should be configured? (systemd or cgroupfs)0 -
@skopos I used systemd, but I believe you can configure one of them, the main thing that they were the same.
0 -
Hi @skopos,
There are steps in the lab guide where the docker daemon gets configured with the correct cgroup driver. This needs to be done on each node. If the steps are missed, these errors will persist.
Regards,
-Chris0 -
which step?
I already did in lab 3.1
step 15 (a) on control planeI do not find any instruction for configuring the worker
0 -
Hi @skopos,
In Exercise 3.2 the steps under "1(c)i for Docker. The content of the
daemon.jsonfile should be the same as presented earlier in Exercise 3.1 step 15(a).Regards,
-Chris0 -
ok I have done as suggested but I have errors in my kubelet service
0 -
Hi @skopos,
I would be interested to see what exactly "failed to load..." Can you attach the kubelet logs from the worker VM syslog, instead of a screenshot?
What Ubuntu version is running on the worker VM? How much CPU, memory and disk space is the worker provisioned with?Regards,
-Chris0 -
@skopos From your logs:
May 09 20:08:54 worker kubelet[9031]: E0509 20:08:54.029745 9031 server.go:294] "Failed to run kubelet" err="failed to run Kubelet: misconfiguration: kubelet cgroup driver: \"systemd\" is different from docker cgroup driver: \"cgroupfs\""-- that is time when you tried to join worker to cluster. I cannot see more attempts to join.Then I can see error like
May 11 20:45:44 worker kubelet[1693]: E0511 20:45:44.491487 1693 server.go:206] "Failed to load kubelet config file" err="failed to load Kubelet config file /var/lib/kubelet/config.yaml, error failed to read kubelet config file \"/var/lib/kubelet/config.yaml\", error: open /var/lib/kubelet/config.yaml: no such file or directory" path="/var/lib/kubelet/config.yaml", and it is okay, because config will be created during joining to cluster withkubeadm joincommand. So just try to rejoin worker.0 -
Hi @skopos,
Thank you for the detailed feedback. I agree with @oleksazhel that your logs show that kubelet panicked about the cgroup driver at first, and then repeatedly about the missing kubelet/config.yaml file, which would need to be generated part of the join phase. Other than that there is nothing else in there to indicate what may be wrong.
However, something that typically is not obvious is the fact that kubelet may misbehave due to insufficient resources - in this case I suspect the 2GB of RAM causing the errors. The worker VM runs the guest OS, the container runtime - docker, and eventually needs to run the kubelet node agent, a proxy node agent, a networking node agent Calico, all this before it will run any containerized workload. The OS and the runtime alone may use up a lot of the 2GB of RAM, so eventually when kubelet is started up, it cannot fully activate the worker node because it no longer has enough working memory.
I recommend, again, that the worker be provisioned with 2 CPU cores and 4+ GB memory to be able to build the cluster. If the physical resources of the host system cannot accommodate two VMs of the required sizes, you could complete many of the lab exercises on a single node cluster, but do expect differences in outputs and in the behavior of certain applications.
Regards,
-Chris1 -
1
Categories
- All Categories
- 175 LFX Mentorship
- 175 LFX Mentorship: Linux Kernel
- 745 Linux Foundation IT Professional Programs
- 372 Cloud Engineer IT Professional Program
- 168 Advanced Cloud Engineer IT Professional Program
- 73 DevOps IT Professional Program - Discontinued
- 3 DevOps & GitOps IT Professional Program
- 98 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- AI & ML Training
- Blockchain & Decentralized Identity Training
- Cloud & Containers Training
- Cybersecurity Training
- DevOps & Site-Reliability Training
- Linux Kernel Development Training
- Networking Training
- Open Source Best Practice Training
- System Administration Training
- System Engineering Training
- Web & Application Development Training
- 2 LFD103-JP クラス フォーラム
- 4 LFD210-CN Class Forum
- 764 LFD259 Class Forum
- 681 LFS101 Class Forum
- 2 LFS158-JP クラス フォーラム
- 162 LFS207 Class Forum
- 3 LFS207-DE-Klassenforum
- 4 LFS207-JP クラス フォーラム
- 61 LFS241 Class Forum
- 52 LFS242 Class Forum
- 42 LFS243 Class Forum
- 19 LFS244 Class Forum
- 4 LFS250-JP クラス フォーラム
- 166 LFS253 Class Forum
- 19 LFS256 Class Forum
- 1.4K LFS258 Class Forum
- 165 LFS261 Class Forum
- 26 LFS267 Class Forum
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 768 Linux Distributions
- 81 Debian
- 67 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 106 Mobile Computing
- 18 Android
- 73 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 945 Programming and Development
- 310 Kernel Development
- 617 Software Development
- 977 Software
- 369 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)
