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
- 167 LFX Mentorship
- 219 LFX Mentorship: Linux Kernel
- 798 Linux Foundation IT Professional Programs
- 356 Cloud Engineer IT Professional Program
- 180 Advanced Cloud Engineer IT Professional Program
- 82 DevOps Engineer IT Professional Program
- 149 Cloud Native Developer IT Professional Program
- 112 Express Training Courses
- 138 Express Courses - Discussion Forum
- 6.2K Training Courses
- 48 LFC110 Class Forum - Discontinued
- 17 LFC131 Class Forum
- 35 LFD102 Class Forum
- 227 LFD103 Class Forum
- 19 LFD110 Class Forum
- 39 LFD121 Class Forum
- 15 LFD133 Class Forum
- 7 LFD134 Class Forum
- 17 LFD137 Class Forum
- 63 LFD201 Class Forum
- 3 LFD210 Class Forum
- 5 LFD210-CN Class Forum
- 2 LFD213 Class Forum - Discontinued
- 128 LFD232 Class Forum - Discontinued
- 1 LFD233 Class Forum
- 2 LFD237 Class Forum
- 23 LFD254 Class Forum
- 697 LFD259 Class Forum
- 109 LFD272 Class Forum
- 3 LFD272-JP クラス フォーラム
- 10 LFD273 Class Forum
- 154 LFS101 Class Forum
- 1 LFS111 Class Forum
- 1 LFS112 Class Forum
- 1 LFS116 Class Forum
- 1 LFS118 Class Forum
- LFS120 Class Forum
- 7 LFS142 Class Forum
- 7 LFS144 Class Forum
- 3 LFS145 Class Forum
- 1 LFS146 Class Forum
- 3 LFS147 Class Forum
- 1 LFS148 Class Forum
- 15 LFS151 Class Forum
- 1 LFS157 Class Forum
- 34 LFS158 Class Forum
- 8 LFS162 Class Forum
- 1 LFS166 Class Forum
- 1 LFS167 Class Forum
- 3 LFS170 Class Forum
- 2 LFS171 Class Forum
- 1 LFS178 Class Forum
- 1 LFS180 Class Forum
- 1 LFS182 Class Forum
- 1 LFS183 Class Forum
- 29 LFS200 Class Forum
- 736 LFS201 Class Forum - Discontinued
- 2 LFS201-JP クラス フォーラム
- 14 LFS203 Class Forum
- 102 LFS207 Class Forum
- 1 LFS207-DE-Klassenforum
- 1 LFS207-JP クラス フォーラム
- 301 LFS211 Class Forum
- 55 LFS216 Class Forum
- 48 LFS241 Class Forum
- 48 LFS242 Class Forum
- 37 LFS243 Class Forum
- 15 LFS244 Class Forum
- LFS245 Class Forum
- LFS246 Class Forum
- 50 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 155 LFS253 Class Forum
- LFS254 Class Forum
- LFS255 Class Forum
- 5 LFS256 Class Forum
- 1 LFS257 Class Forum
- 1.3K LFS258 Class Forum
- 10 LFS258-JP クラス フォーラム
- 121 LFS260 Class Forum
- 159 LFS261 Class Forum
- 41 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 20 LFS267 Class Forum
- 25 LFS268 Class Forum
- 31 LFS269 Class Forum
- 1 LFS270 Class Forum
- 199 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS274 Class Forum
- 3 LFS281 Class Forum
- 10 LFW111 Class Forum
- 261 LFW211 Class Forum
- 182 LFW212 Class Forum
- 15 SKF100 Class Forum
- 1 SKF200 Class Forum
- 1 SKF201 Class Forum
- 782 Hardware
- 198 Drivers
- 68 I/O Devices
- 37 Monitors
- 96 Multimedia
- 174 Networking
- 91 Printers & Scanners
- 83 Storage
- 758 Linux Distributions
- 80 Debian
- 67 Fedora
- 15 Linux Mint
- 13 Mageia
- 23 openSUSE
- 143 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 348 Ubuntu
- 461 Linux System Administration
- 39 Cloud Computing
- 70 Command Line/Scripting
- Github systems admin projects
- 90 Linux Security
- 77 Network Management
- 101 System Management
- 46 Web Management
- 64 Mobile Computing
- 17 Android
- 34 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 371 Off Topic
- 114 Introductions
- 174 Small Talk
- 19 Study Material
- 806 Programming and Development
- 304 Kernel Development
- 204 Software Development
- 1.8K Software
- 211 Applications
- 180 Command Line
- 3 Compiling/Installing
- 405 Games
- 309 Installation
- 97 All In Program
- 97 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)