LFD259: Lab 2.2 - Failing at joining the minion node to cluster
Hi,
I have done with the installations of k8sMaster.sh and k8sSecond.sh.
Now I am trying to run the following command as per the document:
$ sudo kubeadm join -- token ip<172.20.10.4:6443> --discovery-token-ca-cert-hash sha256:
I am getting the below below errors:
cgoka@work:~/kubernetes_LFD259/LFD259/SOLUTIONS/s_02$ sudo kubeadm join --token tkoi0v.vxsnpod7d0mwdpyj \
172.20.10.4:6443 --discovery-token-ca-cert-hash sha256:a0849670c01f8f66c9dc4be8acf7773fd2f33f6be1a54e85db35681bc159b2e2
[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/ error execution phase preflight: [preflight] Some fatal errors occurred: [ERROR DirAvailable--etc-kubernetes-manifests]: /etc/kubernetes/manifests is not empty [ERROR FileAvailable--etc-kubernetes-kubelet.conf]: /etc/kubernetes/kubelet.conf already exists [ERROR Port-10250]: Port 10250 is in use [ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists [preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
Note: I am running on Ubuntu 18.04
Please let me know how to resolve this issue.
Comments
-
Hi,
I moved this discussion to the LFD259 forum since it was created in another class' forum.From your error, it seems that kubeadm was already issued on that node. Assuming you ran k8sMaster.sh on the master node (with kubeadm init), then k8sSecond.sh on minion/worker node (with kubeadm join), your nodes should have joined the cluster. Issuing kubeadm join a second time on the worker node will display such errors.
Try issuing
sudo kubeadm reset
on worker and master nodes.
Then re-issue on the master node
sudo kubeadm init ...
and on the worker node
sudo kubeadm join ...
Another possible issue I see between your Ubuntu 18, and the k8sMaste.sh and k8sSecond.sh installation scripts, which are customized for Ubuntu 16. The very first sentence in Exercise 2.1 mentions Ubuntu 16. Did you see any errors during the installation process?
Pay close attention to exercises as they are compiled and tested for a particular set of versions. Deviating from the instructions may cause inconsistent configurations and outputs.
Regards,
-Chris0 -
I migrated my system into Ubuntu 16.04.
When I start the master with below command.
$bash k8sMaster.sh | tee ~/master.outI am getting below errors:
2019-08-01 16:33:46 (917 KB/s) - ‘calico.yaml’ saved [15051/15051]
unable to recognize "rbac-kdd.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "rbac-kdd.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refused
unable to recognize "calico.yaml": Get http://localhost:8080/api?timeout=32s: dial tcp 127.0.0.1:8080: connect: connection refusedYou should see this node in the output below
It can take up to a mintue for node to show Ready statusThe connection to the server localhost:8080 was refused - did you specify the right host or port?
0 -
Hello,
I see you wrote that you migrated from 18. Am I correct that the Ubuntu 16.04 instance is a fresh install? Please include the command you used (copy and paste would be great) so we can see why you are getting those errors. As it says localhost:8080 I think there may have been a typo or not copying over the proper ~/.kube/config file when the kubeadm init command was run.
Regards,
0 -
Edit your k8sMaster.sh and look at the line:
wget https://tinyurl.com/y8lvqc9g -O calico.yaml
As it is now, it has a slight typo - there are 2 blank spaces right before "-O", and one seems to be treated as a new line.
Edit that line and make sure there is a single blank space before "-O", then it should look similar to:wget https://tinyurl.com/y8lvqc9g -O calico.yaml
This should fix your issue. If you are still seeing timeouts after this, then you may have a firewall enabled, which is blocking traffic to some ports.
Regards,
-Chris0 -
I am using AWS Ubuntu Server 16.04 LTS (HVM), SSD Volume Type instance.
I am running the following command
$ bash k8sMaster.sh | tee ~/master.out
I never ran kubeadm init command yet.0 -
I removed the extra blank before "-O" calico.yaml, still issue persist.
0 -
But I am seeing these files therein current directory-
ubuntu@ip-172-31-36-216:~/LFD259/ckad-1$ ls -ltr
total 24
-rwxrwxr-x 1 ubuntu ubuntu 2139 Aug 1 17:06 k8sMaster.sh
-rw-rw-r-- 1 ubuntu ubuntu 1660 Aug 1 17:07 rbac-kdd.yaml
-rw-rw-r-- 1 ubuntu ubuntu 15051 Aug 1 17:07 calico.yaml0 -
On AWS you need to make sure your EC2 instances are in an SG open to all traffic, that it allows traffic to all ports, all protocols, from all sources.
Also verify that Ubuntu 16 on AWS does not have any firewalls enabled/active by default.kubeadm init is being run as part of the k8sMaster.sh script. The master.out file should have recorded all output, if you also don't mind providing that.
0 -
SG opened for all traffic FUR:
**And firewall also inactive: **
ubuntu@ip-172-31-36-216:~/LFD259/ckad-1$ sudo ufw status
Status: inactive0 -
The detailed output is appreciated.
Not sure which SG of the 2 you are using, but one seems to limit the sources to itself.
I'd also check the VPC setup, IGW, possibly Subnet, RT and NACL.0 -
I am not aware of AWS internals much to check the things. If this is the case, I would go back to my personal laptop, which has Ubuntu 18.04. There I didn't see these many errors.
In Ubuntu 18.04 :
The k8sMaster.sh file was executed successfully with the below command.
$bash k8sMaster.sh | tee ~/master.out
Then I opened a new command prompt to create worker and executed
$bash k8sSecond.sh (as per the document)
Then tried to join like below:$ sudo kubeadm join -- token ip<172.20.10.4:6443> --discovery-token-ca-cert-hash sha256:
After I got the below error:[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/
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR DirAvailable--etc-kubernetes-manifests]: /etc/kubernetes/manifests is not empty
[ERROR FileAvailable--etc-kubernetes-kubelet.conf]: /etc/kubernetes/kubelet.conf already exists
[ERROR Port-10250]: Port 10250 is in use
[ERROR FileAvailable--etc-kubernetes-pki-ca.crt]: /etc/kubernetes/pki/ca.crt already exists
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...But in the very first comment for this thread, you suggested me to execute sudo kubeadm init .. and sudo kubeadm join ..
I am not getting why these commands to be executed. I have never seen sudo kubeadm init command in the document.0 -
If you look closely in the k8sMaster.sh you will find the kubeadm init command.
How many EC2 instances did you start on AWS?
0 -
Only one instance
0 -
That is your problem right there.
Please read the lab instructions carefully, as they guide you to create a 2 node cluster. Specific steps in the lab exercise are executed on your 1st node, and specific steps on your 2nd node. Read closely the instructions of each step in the exercises, and the commands you need to run. The hostname of the command indicates the node you should be on.
Good luck!
-Chris0
Categories
- All Categories
- 217 LFX Mentorship
- 217 LFX Mentorship: Linux Kernel
- 788 Linux Foundation IT Professional Programs
- 352 Cloud Engineer IT Professional Program
- 177 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 146 Cloud Native Developer IT Professional Program
- 137 Express Training Courses
- 137 Express Courses - Discussion Forum
- 6.2K Training Courses
- 46 LFC110 Class Forum - Discontinued
- 70 LFC131 Class Forum
- 42 LFD102 Class Forum
- 226 LFD103 Class Forum
- 18 LFD110 Class Forum
- 37 LFD121 Class Forum
- 18 LFD133 Class Forum
- 7 LFD134 Class Forum
- 18 LFD137 Class Forum
- 71 LFD201 Class Forum
- 4 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 2 LFD233 Class Forum
- 4 LFD237 Class Forum
- 24 LFD254 Class Forum
- 694 LFD259 Class Forum
- 111 LFD272 Class Forum
- 4 LFD272-JP クラス フォーラム
- 12 LFD273 Class Forum
- 146 LFS101 Class Forum
- 1 LFS111 Class Forum
- 3 LFS112 Class Forum
- 2 LFS116 Class Forum
- 4 LFS118 Class Forum
- 6 LFS142 Class Forum
- 5 LFS144 Class Forum
- 4 LFS145 Class Forum
- 2 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 2 LFS157 Class Forum
- 25 LFS158 Class Forum
- 7 LFS162 Class Forum
- 2 LFS166 Class Forum
- 4 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 3 LFS178 Class Forum
- 3 LFS180 Class Forum
- 2 LFS182 Class Forum
- 5 LFS183 Class Forum
- 31 LFS200 Class Forum
- 737 LFS201 Class Forum - Discontinued
- 3 LFS201-JP クラス フォーラム
- 18 LFS203 Class Forum
- 130 LFS207 Class Forum
- 2 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 302 LFS211 Class Forum
- 56 LFS216 Class Forum
- 52 LFS241 Class Forum
- 48 LFS242 Class Forum
- 38 LFS243 Class Forum
- 15 LFS244 Class Forum
- 2 LFS245 Class Forum
- LFS246 Class Forum
- 48 LFS250 Class Forum
- 2 LFS250-JP クラス フォーラム
- 1 LFS251 Class Forum
- 151 LFS253 Class Forum
- 1 LFS254 Class Forum
- 1 LFS255 Class Forum
- 7 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.2K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 118 LFS260 Class Forum
- 159 LFS261 Class Forum
- 42 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 24 LFS267 Class Forum
- 22 LFS268 Class Forum
- 30 LFS269 Class Forum
- LFS270 Class Forum
- 202 LFS272 Class Forum
- 2 LFS272-JP クラス フォーラム
- 1 LFS274 Class Forum
- 4 LFS281 Class Forum
- 9 LFW111 Class Forum
- 259 LFW211 Class Forum
- 181 LFW212 Class Forum
- 13 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 795 Hardware
- 199 Drivers
- 68 I/O Devices
- 37 Monitors
- 102 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 85 Storage
- 758 Linux Distributions
- 82 Debian
- 67 Fedora
- 17 Linux Mint
- 13 Mageia
- 23 openSUSE
- 148 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 353 Ubuntu
- 468 Linux System Administration
- 39 Cloud Computing
- 71 Command Line/Scripting
- Github systems admin projects
- 93 Linux Security
- 78 Network Management
- 102 System Management
- 47 Web Management
- 63 Mobile Computing
- 18 Android
- 33 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 371 Off Topic
- 114 Introductions
- 174 Small Talk
- 22 Study Material
- 805 Programming and Development
- 303 Kernel Development
- 484 Software Development
- 1.8K Software
- 261 Applications
- 183 Command Line
- 3 Compiling/Installing
- 987 Games
- 317 Installation
- 96 All In Program
- 96 All In 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)