Related to https://github.com/kubernetes/kubeadm/issues/223 , but the proposed solution doesn't fix the problem.
BUG REPORT
kubeadm version (use kubeadm version):
master: kubeadm version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.4", GitCommit:"d6f433224538d4f9ca2f7ae19b252e6fcb66a3ae", GitTreeState:"clean", BuildDate:"2017-05-19T18:33:17Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}
d0603
slave: kubeadm version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.4", GitCommit:"d6f433224538d4f9ca2f7ae19b252e6fcb66a3ae", GitTreeState:"clean", BuildDate:"2017-05-19T18:33:17Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}
Environment:
kubectl version): Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.4", GitCommit:"d6f433224538d4f9ca2f7ae19b252e6fcb66a3ae", GitTreeState:"clean", BuildDate:"2017-05-19T18:44:27Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.4", GitCommit:"d6f433224538d4f9ca2f7ae19b252e6fcb66a3ae", GitTreeState:"clean", BuildDate:"2017-05-19T18:33:17Z", GoVersion:"go1.7.5", Compiler:"gc", Platform:"linux/amd64"}uname -a): Linux NAME 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linuxkubectl apply -f http://docs.projectcalico.org/v2.3/getting-started/kubernetes/installation/hosted/kubeadm/1.6/calico.yamlFollowing this guide https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/ I would like to add a node to my cluster with kubeadm join.
This returns the following output:
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[preflight] Running pre-flight checks
[discovery] Trying to connect to API Server "IP_ADDRESS:6443"
[discovery] Created cluster-info discovery client, requesting info from "https://IP_ADDRESS:6443"
[discovery] Failed to request cluster info, will try again: [Get https://IP_ADDRESS:6443/api/v1/namespaces/kube-public/configmaps/cluster-info: Forbidden]
I expected the node to connect to master
Follow the documentation linked above.
nmap says that port 6443 on master is open
PORT STATE SERVICE
6443/tcp open unknown
If I pass a Hostname instead of an IP to the join operation fails in the second step:
$ kubeadm join --token TOKEN.TOKEN HOSTNAME:6443
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[preflight] Running pre-flight checks
[discovery] Trying to connect to API Server "HOSTNAME:6443"
[discovery] Created cluster-info discovery client, requesting info from "https://HOSTNAME:6443"
[discovery] Cluster info signature and contents are valid, will use API Server "https://HOSTNAME:6443"
[discovery] Successfully established connection with API Server "HOSTNAME:6443"
failed to check server version: Get https://IP_ADDRESS:6443/version: Forbidden
On the check of the server version it falls back to IP address though. Is this a configuration issue? Is it possible to initialize the root with a hostname instead of its IP address?
Solution: Execute join command with no_proxy: no_proxy=IP_ADDRESS kubeadm join [...]
@Steffen911 . I am getting the same issue. Could you please let me know what does no_proxy=IP_ADDRESS means which IP_ADDRESS you are talking about?
Below the output of netstat -tulnp | grep 6443 on master :
tcp6 0 0 :::6443 :::* LISTEN 12181/kube-apiserve
@satyamsah If you see this problem it most likely means that you are behind a proxy that blocks connections to your k8s-master.
If you set no_proxy=IP_ADDRESS where IP_ADDRESS is the public IP of your k8s-master-node it ignores your proxy settings for this call.
@Steffen911 I tried with no_proxy..... still receive the same error
Most helpful comment
Solution: Execute join command with no_proxy:
no_proxy=IP_ADDRESS kubeadm join [...]