kubernetes / kubeadm

Aggregator for issues filed against kubeadm
Apache License 2.0
3.76k stars 716 forks source link

kubeadm join a new work node #3128

Open Jerry-yz opened 2 days ago

Jerry-yz commented 2 days ago

What keywords did you search in kubeadm issues before filing this one?

If you have found any duplicates, you should instead reply there and close this page.

If you have not found any duplicates, delete this section and continue on.

Is this a BUG REPORT or FEATURE REQUEST?

Choose one: BUG REPORT or FEATURE REQUEST

Versions

kubeadm version (use kubeadm version):

Environment:

What happened?

kubeadm join 192.168.200.160:6443 --token 7nv61h.9jtc4jma273dd1u0 --discovery-token-ca-cert-hash sha256:90e036fb228057cfbc5b338609c292f549ade0d3ec547c5704606a9dade8a2c6 i use kubeadm join a work node to master, it failed issue log: x509 certficate is valid 192.11.90.160, 127.0.0.1 not 192.168.200.160 then i change 192.168.200.160 to domain, try it, it failed Get "https://xxxx: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)

What you expected to happen?

how to fix it

How to reproduce it (as minimally and precisely as possible)?

Anything else we need to know?

kundan2707 commented 1 day ago

/kind support

pacoxu commented 5 hours ago

The apiserver is bound to 192.11.90.160, and is 192.168.200.160 another IP of the master node? Can the apiserver bind the 192.168.200.160 as well in kubeadm init --apiserver-advertise-address=192.168.200.160?

https://github.com/kubernetes/kubernetes/blob/40f222b6201d5c6476e5b20f57a4a7d8b2d71845/cmd/kubeadm/app/phases/certs/doc.go#L25-L26