Kubernetes worker node connection refused while joining cluser to master node

2/13/2019

I'm working on k8s setup with 1 master node and 1 worker node. I'm done with master setup and now I'm trying to joining node to cluster:

sudo kubeadm join master_ip:6443 --token [token] --discovery-token-ca-cert-hash sha256:[key]

But got this error:

[discovery] Trying to connect to API Server "master_ip:6443"
[discovery] Created cluster-info discovery client, requesting info from "https://master_ip:6443"
[discovery] Failed to request cluster info, will try again: [Get https://master_ip:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: dial tcp master_ip:6443: i/o timeout]

I use two EC2 instances with CentOS 7 (1 for master and 1 for worker). I'm able to telnet master_ip 6443 within the master, but failed within the worker.

What's going wrong here?

-- Justinus Hermawan
amazon-web-services
centos
docker
kubernetes

1 Answer

2/13/2019

I solved this by setting AWS security group for the port.

-- Justinus Hermawan
Source: StackOverflow