-
Notifications
You must be signed in to change notification settings - Fork 715
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
kubeadm master ip change without reseting the cluster (by changing all certificate including ca ) #2016
Comments
after that If I tried to change all cert by doing this #2015 |
this is not supported by kubeadm and the kubeadm team. it's a core kubernetes problem! there are some proposals here: a cluster should be created with a DNS name (or hostname in /etc/hosts). using an IP is a security contract and changing it is very complicated!! |
/triage support |
@neolit123 could you help me how to create kubeadm init with only fqdn/DNS name so if we dont have to worry to change ip later kubeadm init --apiserver-advertise-address ubuntu --apiserver-cert-extra-sans ubuntu --node-name ubuntu So I did after added hostname by using --apiserver-cert-extra-sans .I could see my hostname is pushed in ihe certificate ,but still after changing ip I am not able to run kubectl command as it is still checking with ip only not hostname root@ubuntu:~/.kube# kubectl get po Note (I have changed the ip in kubeconfig file ,all manifest file ,all config file Please help |
please see the notes about it supports DNS names and can be used instead of |
@neolit123 thanks for you suggestion its works like a charm
|
@neolit123 please help |
i don't have an explanation of why this is happening. |
I have followed below ,but problem is it is using same certificate,kindly help me to to the same task by replacing all certificate(including ca)
systemctl stop kubelet docker
cd /etc/
mv kubernetes kubernetes-backup
mv /var/lib/kubelet /var/lib/kubelet-backup
mkdir -p kubernetes
cp -r kubernetes-backup/pki kubernetes
rm kubernetes/pki/{apiserver.,etcd/peer.}
rm -rf /root/.kube
change ip
systemctl start docker$(id -u):$ (id -g) "$HOME"/.kube/config
kubeadm init --apiserver-advertise-address new_ip --ignore-preflight-errors=DirAvailable--var-lib-etcd
--kubernetes-version=1.15.4
rm -rf /root/.kube
mkdir -p "$HOME"/.kube
sudo cp -rf /etc/kubernetes/admin.conf "$HOME"/.kube/config
sudo chown
kubectl taint node --all node-role.kubernetes.io/master-
The text was updated successfully, but these errors were encountered: