Lab 3.2 worker connecting to cp issues
Hello. I'm working on two AWS EC2 instances, and my worker node is having trouble connecting to the control pane.
It's getting hung up on the preflight checks at the moment, with the following log output
I1207 22:26:01.963500 49517 token.go:217] [discovery] Failed to request cluster-info, will try again: Get "https://k8scp:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
Interestingly enough, on the cp node, i got the following when trying to do kubeadm init
kubeadm init --config=kubeadm-config.yaml --upload-certs | tee kubeadm-init.out
W1207 22:17:31.649377 100230 version.go:104] could not fetch a Kubernetes version from the internet: unable to get URL "https://dl.k8s.io/release/stable.txt": Get "https://dl.k8s.io/release/stable.txt": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
W1207 22:17:31.649450 100230 version.go:105] falling back to the local client version: v1.27.1
[init] Using Kubernetes version: v1.27.1
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR Port-6443]: Port 6443 is in use
[ERROR Port-10259]: Port 10259 is in use
[ERROR Port-10257]: Port 10257 is in use
[ERROR FileAvailable--etc-kubernetes-manifests-kube-apiserver.yaml]: /etc/kubernetes/manifests/kube-apiserver.yaml already exists
[ERROR FileAvailable--etc-kubernetes-manifests-kube-controller-manager.yaml]: /etc/kubernetes/manifests/kube-controller-manager.yaml already exists
[ERROR FileAvailable--etc-kubernetes-manifests-kube-scheduler.yaml]: /etc/kubernetes/manifests/kube-scheduler.yaml already exists
[ERROR FileAvailable--etc-kubernetes-manifests-etcd.yaml]: /etc/kubernetes/manifests/etcd.yaml already exists
[ERROR Port-10250]: Port 10250 is in use
[ERROR Port-2379]: Port 2379 is in use
[ERROR Port-2380]: Port 2380 is in use
[ERROR DirAvailable--var-lib-etcd]: /var/lib/etcd is not empty
[preflight] If you know what you are doing, you can make a check non-fatal with --ignore-preflight-errors=...
However, I was still able to generate a join command after looking through the forums here:
kubeadm join k8scp:6443 --token "TOKEN" --discovery-token-ca-cert-hash sha256:"HASH"
It's possible that there are other angles to go at it, but they're in the same subnet, same security group and ssh is open on port 22. They're also part of the same VPC. Not sure what else I can do to make the connection but any help would be appreciated it!
Comments
-
Hi @nmoy,
You may be experiencing connectivity issues, possibly from a misconfigured SG. I'd recommend following closely the AWS infra configuration video from the introductory chapter when setting up the networking and configuring the EC2 instances.
In addition, please ensure the cp script runs only once on the control plane VM, and the worker script runs only once on the second VM. The
kubeadm init
andkubeadm join
should also run only once respectively.Regards,
-Chris1 -
Which CP script are you referring to? And which Worker script? Also, my ingress and egress rules are wide open Started from scratch to see what happens. 3.1 seems to run fine, but it's when it's 3.2 that seems to not go well.
0 -
Hi @nmoy,
I meant the sequence of installation and config commands specific to each node...
Assuming all your VMs are protected by the same inbound SG and same outbound SG, both VMs running Ubuntu 20.04 LTS, have the minimum 2 CPU, 8 GB RAM and 15-20 GB disk, the error indicates that the
init
command was executed on a VM where either aninit
or ajoin
has completed earlier. This is what it means where a port is in use already, or when a file or directory already exists.If the
init
is not successful, even if you generate thejoin
command for the worker node, the joining of the two nodes will not be successful.I will attempt the cluster installation on AWS once again, to see if I can reproduce your errors...
Regards,
-Chris0 -
Any such luck with the repro @chrispokorni ?
0 -
Hi @nmoy,
The bad news is... I cannot reproduce your issue.
I closely followed the AWS setup video from the intro chapter and I ran through every single installation and config step starting with lab exercise 3.1... and it all works as expected.
There are no errors during
kubeadm init
about ports in use or files already available. These errors only occur whenkubeadm
is run multiple times in a row on the same system. Both theinit
andjoin
commands are evaluating the state of the VM and produce such errors when the VM was already initialized through aninit
or has joined a cluster through ajoin
command.Correctly setting up the
/etc/hosts
file on both machines is also critical. Thecp-private-IP-address k8scp
entry needs to be identical in both files, on both systems respectively, set with the private IP address of the control plane node. I also made sure every single command was copied in its entirety and ran successfully without errors in the terminal.The AWS setup video does not call for an outbound rule, yet I see one defined on your infrastructure. Without seeing the entire history of commands ran on each instance I cannot say what causes the errors reported above, whether it is a step that may have been modified, skipped, or added to the commands sequence from the lab guide...
Regards,
-Chris0 -
It's possible that there's some mystery x factor in my companys account that's preventing it working. But thanks for trying!
0
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.1K Training Courses
- 46 LFC110 Class Forum - Discontinued
- 70 LFC131 Class Forum
- 42 LFD102 Class Forum
- 226 LFD103 Class Forum
- 18 LFD110 Class Forum
- 36 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
- 693 LFD259 Class Forum
- 111 LFD272 Class Forum
- 4 LFD272-JP クラス フォーラム
- 12 LFD273 Class Forum
- 144 LFS101 Class Forum
- 1 LFS111 Class Forum
- 3 LFS112 Class Forum
- 2 LFS116 Class Forum
- 4 LFS118 Class Forum
- 4 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
- 150 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
- 370 Off Topic
- 114 Introductions
- 173 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)