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
- 154 LFX Mentorship
- 154 LFX Mentorship: Linux Kernel
- 665 Linux Foundation IT Professional Programs
- 319 Cloud Engineer IT Professional Program
- 141 Advanced Cloud Engineer IT Professional Program
- 54 DevOps Engineer IT Professional Program
- 120 Cloud Native Developer IT Professional Program
- 91 Express Training Courses
- 91 Express Courses - Discussion Forum
- 5.4K Training Courses
- 19 LFC110 Class Forum - Discontinued
- 12 LFC131 Class Forum
- 32 LFD102 Class Forum
- 191 LFD103 Class Forum
- 9 LFD110 Class Forum
- 24 LFD121 Class Forum
- 14 LFD133 Class Forum
- 14 LFD137 Class Forum
- 62 LFD201 Class Forum
- 2 LFD210 Class Forum
- 1 LFD210-CN Class Forum
- 1 LFD213 Class Forum - Discontinued
- 127 LFD232 Class Forum - Discontinued
- LFD233 Class Forum
- LFD237 Class Forum
- 22 LFD254 Class Forum
- 644 LFD259 Class Forum
- 107 LFD272 Class Forum
- 1 LFD272-JP クラス フォーラム
- 7 LFD273 Class Forum
- 2 LFS101 Class Forum
- LFS112 Class Forum
- LFS116 Class Forum
- LFS118 Class Forum
- LFS142 Class Forum
- LFS144 Class Forum
- 2 LFS145 Class Forum
- LFS146 Class Forum
- LFS151 Class Forum
- LFS157 Class Forum
- LFS158 Class Forum
- LFS162 Class Forum
- LFS166 Class Forum
- LFS167 Class Forum
- LFS170 Class Forum
- LFS171 Class Forum
- LFS178 Class Forum
- LFS180 Class Forum
- LFS182 Class Forum
- LFS183 Class Forum
- 28 LFS200 Class Forum
- 735 LFS201 Class Forum - Discontinued
- 1 LFS201-JP クラス フォーラム
- 13 LFS203 Class Forum
- 98 LFS207 Class Forum
- 299 LFS211 Class Forum
- 54 LFS216 Class Forum
- 47 LFS241 Class Forum
- 41 LFS242 Class Forum
- 36 LFS243 Class Forum
- 12 LFS244 Class Forum
- LFS245 Class Forum
- 42 LFS250 Class Forum
- 1 LFS250-JP クラス フォーラム
- LFS251 Class Forum
- 141 LFS253 Class Forum
- LFS254 Class Forum
- LFS255 Class Forum
- 4 LFS256 Class Forum
- LFS257 Class Forum
- 1.2K LFS258 Class Forum
- 9 LFS258-JP クラス フォーラム
- 110 LFS260 Class Forum
- 147 LFS261 Class Forum
- 39 LFS262 Class Forum
- 82 LFS263 Class Forum - Discontinued
- 15 LFS264 Class Forum - Discontinued
- 11 LFS266 Class Forum - Discontinued
- 20 LFS267 Class Forum
- 18 LFS268 Class Forum
- 26 LFS269 Class Forum
- 198 LFS272 Class Forum
- 1 LFS272-JP クラス フォーラム
- LFS274 Class Forum
- 3 LFS281 Class Forum
- LFW111 Class Forum
- 254 LFW211 Class Forum
- 173 LFW212 Class Forum
- 9 SKF100 Class Forum
- SKF200 Class Forum
- 781 Hardware
- 198 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 174 Networking
- 87 Printers & Scanners
- 83 Storage
- 742 Linux Distributions
- 80 Debian
- 66 Fedora
- 15 Linux Mint
- 13 Mageia
- 23 openSUSE
- 143 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 347 Ubuntu
- 460 Linux System Administration
- 40 Cloud Computing
- 69 Command Line/Scripting
- Github systems admin projects
- 89 Linux Security
- 77 Network Management
- 101 System Management
- 46 Web Management
- 51 Mobile Computing
- 17 Android
- 24 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 357 Off Topic
- 109 Introductions
- 169 Small Talk
- 18 Study Material
- 504 Programming and Development
- 283 Kernel Development
- 203 Software Development
- 1.1K Software
- 210 Applications
- 180 Command Line
- 3 Compiling/Installing
- 398 Games
- 308 Installation
- 51 All In Program
- 51 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)