Error when attempting to join minion to master
I keep running into the same error on Lab Exercise 2.2 when attempting to join my minion to my cluster.
I have 2 EC2 instances, we'll call them k1 andk2.
I'm able to successfully run the k8sMaster.sh script on k1:
ubuntu@ip-172-31-22-69:~$ kubectl get node NAME STATUS ROLES AGE VERSION ip-172-31-22-69 Ready master 2m13s v1.15.1
Next, I follow all the steps in the docs and run k8sSecond.sh on k2. I get the following output and the process seems to hang:
ubuntu@ip-172-31-18-250:~$ sudo kubeadm join 172.31.22.69:6443 --token {mytoken} \
[preflight] Running pre-flight checks
[WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
Here's what I see in /var/log/syslog after making the command above:
Aug 23 18:43:05 ip-172-31-18-250 systemd[1]: kubelet.service: Service hold-off time over, scheduling restart. Aug 23 18:43:05 ip-172-31-18-250 systemd[1]: Stopped kubelet: The Kubernetes Node Agent. Aug 23 18:43:05 ip-172-31-18-250 systemd[1]: Started kubelet: The Kubernetes Node Agent. Aug 23 18:43:05 ip-172-31-18-250 kubelet[31570]: F0823 18:43:05.921062 31570 server.go:198] 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 Aug 23 18:43:05 ip-172-31-18-250 systemd[1]: kubelet.service: Main process exited, code=exited, status=255/n/a Aug 23 18:43:05 ip-172-31-18-250 systemd[1]: kubelet.service: Unit entered failed state. Aug 23 18:43:05 ip-172-31-18-250 systemd[1]: kubelet.service: Failed with result 'exit-code'.
I've terminated and rebuilt the instances, tried doing kubeadm reset on both and kubeadm init on k1, and nothing seems to work. Any ideas? I've pretty much exhausted all avenues and am now willing to start pasting random commands into the CLI ![]()
Comments
-
Thanks @serewicz.
The output I pasted from my join is everything. I will try the debug command later and report back.The kubeadm join is indeed a copy-paste from master. I am now suspecting an issue with the networking/firewall setup. I set up 2 EC2 instances on AWS but I didn't do anything from a networking perspective to either, so i'm guessing there is a network setting (firewall, iptable, etc) that I need to change in order to get this to work.
Thanks for your help.
0 -
Just want to update this for future students:
I solved this issue by assigning my EC2 instances to the same Security Group and making sure it allows all inbound/outbound traffic on all ports. Once I did that I was able to get my minion to join the cluster. Thanks to @serewicz for the inspiration.0 -
Hi, thanks for this Darius - have same issue ... Does work as you say when you completely open out the AWS Security Group (SG) but not hugely comfortable with this approach...
@Tim is it plausible/practical to obtain a list of the Port and Protocols to implement finer-grained 'holes' in the SG ? Are the Master-Minion comms primarily SSH and/or TCP ?? Please advise ? Many Thanks ! ...0 -
Hi @k8ckad ,
Kubernetes agents communicate across the cluster via API calls.
While not necessarily complete (but a good starting point), you could use the port numbers lists below to start creating FW rules and/or SG rules for your Kubernetes nodes:Regards,
-Chris1
Categories
- All Categories
- 177 LFX Mentorship
- 177 LFX Mentorship: Linux Kernel
- 754 Linux Foundation IT Professional Programs
- 374 Cloud Engineer IT Professional Program
- 170 Advanced Cloud Engineer IT Professional Program
- 74 DevOps IT Professional Program - Discontinued
- 5 DevOps & GitOps IT Professional Program
- 100 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 2 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 5 Cloud & Containers Training
- 1 Cybersecurity Training
- 2 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 1 Networking Training
- 2 Open Source Best Practice Training
- 2 System Administration Training
- 1 System Engineering Training
- 1 Web & Application Development Training
- 794 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 89 Storage
- 769 Linux Distributions
- 81 Debian
- 68 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
- 112 Mobile Computing
- 20 Android
- 77 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 393 Off Topic
- 121 Introductions
- 182 Small Talk
- 29 Study Material
- 976 Programming and Development
- 310 Kernel Development
- 648 Software Development
- 990 Software
- 382 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
- 1.4K LFS258 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)