Welcome to the Linux Foundation Forum!

cant join the worker node with master node- kubeadm join

Options

Hi

i have master node

Master node ip : 172.22.4.139 ubuntu@traincka2
worker node ip : 172.22.4.133 ubuntu@traincka1

ubuntu@traincka2:~$ kubectl get all
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/kubernetes ClusterIP 10.96.0.1 443/TCP 81m
ubuntu@traincka2:~$

ubuntu@traincka2:~$ kubectl get po -n kube-system
NAME READY STATUS RESTARTS AGE
calico-kube-controllers-658d97c59c-bxl8q 1/1 Running 0 82m
calico-node-l2zft 1/1 Running 0 82m
coredns-76f75df574-mz5lz 1/1 Running 0 83m
coredns-76f75df574-nc77b 1/1 Running 0 83m
etcd-traincka2 1/1 Running 2 83m
kube-apiserver-traincka2 1/1 Running 2 83m
kube-controller-manager-traincka2 1/1 Running 2 83m
kube-proxy-7q2bm 1/1 Running 0 83m
kube-scheduler-traincka2 1/1 Running 2 83m

ubuntu@traincka2:~$ ss -tulpn | grep 6443
tcp LISTEN 0 4096 *:6443 *:

but unable to join from the worker node.

sudo kubeadm join 172.22.4.139:6443 --token kmga6q.n24jk5oa6vz865wz \
--discovery-token-ca-cert-hash sha256:db57754a04a723c6feb3c567761c850782f5c4e6711fd77e0cbd8091fd68dc36 --v=6

**error **

I0323 16:33:06.861722 16578 token.go:217] [discovery] Failed to request cluster-info, will try again: Get "https://172.22.4.139:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": dial tcp 172.22.4.139:6443: connect: no route to host
I0323 16:33:11.892586 16578 round_trippers.go:553] GET https://172.22.4.139:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s in 0 milliseconds
I0323 16:33:11.892664 16578 token.go:217] [discovery] Failed to request cluster-info, will try again: Get "https://172.22.4.139:6443/api/v1/namespaces/kube-public/configmaps/cluster-info?timeout=10s": dial tcp 172.22.4.139:6443: connect: no route to host

Answers

  • irfathr
    irfathr Posts: 2
    Options

    resolved. it was a iptable issue and had to flush the ip table commands.

    sudo iptables -L -n -v
    210 sudo iptables -F
    211 sudo iptables -X
    212 sudo iptables -t nat -F
    213 sudo iptables -t nat -X
    214 sudo iptables -t mangle -F
    215 sudo iptables -t mangle -X
    216 sudo iptables -P INPUT ACCEPT
    217 sudo iptables -P FORWARD ACCEPT
    218 sudo iptables -P OUTPUT ACCEPT
    219 sudo iptables-save | sudo tee /etc/iptables/rules.v4
    220 sudo ufw disable

  • chrispokorni
    chrispokorni Posts: 2,178
    Options

    Hi @irfathr,

    Depending on the host OS and compatible hypervisor or runtime provisioning the Kubernetes nodes, there may be networking requirements that need special configuration options.

    Regards,
    -Chris

Categories

Upcoming Training