Lab 16.2 Join Control Plane Nodes step 2
Hi,
stuck at the step 2 in chapter "Join Control Plane Nodes", i can't create a token on my master-node aka "cp"-node. All the other steps up to this point have worked so far.
****error message:****
student@master:~$ sudo kubeadm token create --v=5
I0124 19:16:49.817339 28387 token.go:123] [token] validating mixed arguments
I0124 19:16:49.817413 28387 token.go:132] [token] getting Clientsets from kubeconfig file
I0124 19:16:49.817457 28387 cmdutil.go:81] Using kubeconfig file: /home/student/.kube/config
I0124 19:16:49.821938 28387 token.go:247] [token] loading configurations
I0124 19:16:49.824444 28387 interface.go:431] Looking for default routes with IPv4 addresses
I0124 19:16:49.824475 28387 interface.go:436] Default route transits interface "ens4"
I0124 19:16:49.824649 28387 interface.go:208] Interface ens4 is up
I0124 19:16:49.824730 28387 interface.go:256] Interface "ens4" has 2 addresses :[10.2.0.21/32 fe80::4001:aff:fe02:15/64].
I0124 19:16:49.824780 28387 interface.go:223] Checking addr 10.2.0.21/32.
I0124 19:16:49.824801 28387 interface.go:230] IP found 10.2.0.21
I0124 19:16:49.824821 28387 interface.go:262] Found valid IPv4 address 10.2.0.21 for interface "ens4".
I0124 19:16:49.824839 28387 interface.go:442] Found active IP 10.2.0.21
I0124 19:16:49.824887 28387 kubelet.go:203] the value of KubeletConfiguration.cgroupDriver is empty; setting it to "systemd"
I0124 19:16:49.831301 28387 token.go:254] [token] creating token
I0124 19:16:49.834186 28387 with_retry.go:171] Got a Retry-After 1s response for attempt 1 to https://k8scp:6443/api/v1/namespaces/kube-system/secrets/bootstrap-token-qkva0e?timeout=10s
I0124 19:16:50.836217 28387 with_retry.go:171] Got a Retry-After 1s response for attempt 2 to https://k8scp:6443/api/v1/namespaces/kube-system/secrets/bootstrap-token-qkva0e?timeout=10s
I0124 19:16:51.838076 28387 with_retry.go:171] Got a Retry-After 1s response for attempt 3 to https://k8scp:6443/api/v1/namespaces/kube-system/secrets/bootstrap-token-qkva0e?timeout=10s
I0124 19:16:52.839762 28387 with_retry.go:171] Got a Retry-After 1s response for attempt 4 to https://k8scp:6443/api/v1/namespaces/kube-system/secrets/bootstrap-token-qkva0e?timeout=10s
I0124 19:16:53.841190 28387 with_retry.go:171] Got a Retry-After 1s response for attempt 5 to https://k8scp:6443/api/v1/namespaces/kube-system/secrets/bootstrap-token-qkva0e?timeout=10s
I0124 19:16:54.843844 28387 with_retry.go:171] Got a Retry-After 1s response for attempt 6 to https://k8scp:6443/api/v1/namespaces/kube-system/secrets/bootstrap-token-qkva0e?timeout=10s
I0124 19:16:55.845497 28387 with_retry.go:171] Got a Retry-After 1s response for attempt 7 to https://k8scp:6443/api/v1/namespaces/kube-system/secrets/bootstrap-token-qkva0e?timeout=10s
I0124 19:16:56.847277 28387 with_retry.go:171] Got a Retry-After 1s response for attempt 8 to https://k8scp:6443/api/v1/namespaces/kube-system/secrets/bootstrap-token-qkva0e?timeout=10s
I0124 19:16:57.849205 28387 with_retry.go:171] Got a Retry-After 1s response for attempt 9 to https://k8scp:6443/api/v1/namespaces/kube-system/secrets/bootstrap-token-qkva0e?timeout=10s
I0124 19:16:58.850850 28387 with_retry.go:171] Got a Retry-After 1s response for attempt 10 to https://k8scp:6443/api/v1/namespaces/kube-system/secrets/bootstrap-token-qkva0e?timeout=10s
timed out waiting for the condition
Answers
-
provide some more logs, such as
kubectl get nodes
systemctl status kubelet
systemctl status docker
systemctl status kubeadm
0 -
additional logs:
0 -
Looks like your
kubectl
having trouble. Please also send the output ofsudo cat /etc/hosts
and the IP of the master node where you were trying to runkubectl get nodes
.0 -
The alias k8scp of the master node (and of all nodes of the cluster) is set to the ip-address of the "ha-proxy" node (34.76.211.235) as required by the instructions in step 16.1of the chapter "Join Control Plane Nodes".
The external IP of the master node is: 34.76.113.1420 -
Have you configured
ha-proxy
on thestudent@master
node or on a different node?0 -
I have configured the ha-proxy on a different node.
0 -
And are you using Local VMs / AWS EC2 / GCP VMs?
0 -
I am using the GCP VMs.
0 -
I think the mistake you are doing is that in
/etc/hosts
the IP would be your haproxy VM Internal IP, not External IP. Most likely your haproxy VM Internal IP will be from this network10.2.0.x
. External IP will be used to access the resource from your local machine browser and for SSH.
Runifconfig
in haproxy VM then check the Internal IP and set that internal IP into your control-plane (cp) node's/etc/hosts
. Then runkubectl get nodes
. This command should be executed successfully. Then access haproxy from browser by running34.76.211.235:9999/stats
orExternal_IP_of_haproxy:9999/stats
. if still, you are facing issues then let me know we will set an online meeting to resolve your issue.0 -
I added the internal ip-address of the ha-proxy on all Nodes (for e.g. on master-node see first screenshot below) , as required in the lab step1. But to create an token at the step 3 on the master it failed, the result you can see at my first post above with the error log****error message:****
The steps "to use a local browser to navigate to the public IP of your proxy server. " before worked fine for me so far.
0 -
Hi @celtium,
In the section "Deploy a Load Balancer", how did you configure the
haproxy.cfg
file in step 2?Did
haproxy.service
restart successfully in step3?After setting the
k8scp
alias on the haproxy node's/etc/hosts
file, didkubectl get nodes
produce the expected output in step 6?Regards,
-Chris0 -
show me your
haproxy.cfg
. And please share the output ofifconfig
internal IP for all nodes.0 -
I have the same problem
0 -
file lab 3 node master
apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
kubernetesVersion: 1.23.1
controlPlaneEndpoint: "masterkub:6443"
networking:
podSubnet: 192.168.0.0/160 -
node ha-proxi
ip addr | grep inet | grep 10
inet 10.2.0.8/32 scope global dynamic ens4file haproxy.cfg
backend k8sServers
balance roundrobin
server masterkub 10.2.0.6:6443 check0 -
when executed join generate error
unable to add a new control plane instance to a cluster that doesn't have a stable controlPlaneEndpoint address
0 -
attached file with info
0 -
I have removed --control-plane and node join
NAME STATUS ROLES AGE VERSION
masterkub Ready control-plane,master 46d v1.23.1
secondcp Ready 45m v1.23.1
workerkub Ready 46d v1.23.10 -
Hi @etofran810,
The control plane should be advertised via the
k8scp
alias, not the control plane node hostname. Thek8scp
alias should be used to bootstrap the cluster, not the control plane node hostname, just as presented in the lab guide. This allows for the flexibility needed to re-assign the alias to another node, as intended by the exercise once the ha-proxy node has been added to the cluster's topology.Regards,
-Chris0 -
ok, I am going to modify alias to k8scp
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.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
- 693 LFD259 Class Forum
- 111 LFD272 Class Forum
- 4 LFD272-JP クラス フォーラム
- 12 LFD273 Class Forum
- 145 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
- 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)