kubernetes cluster master change ip address

1, cd / etc / kubernetes /

2, in the current directory and its subdirectories to find the file that contains the 192.168.137.204

    find . -type f |xargs grep 192.168.137.204 |awk '{print $1}' |sort |uniq

    Ip address lookup to replace all the files to the new address

3, delete the original certificate

   mv / etc / kubernetes / PKI /etc/kubernetes/pki.old

4, regenerate all the certificates

   kubeadm init phase certs all

5, restart the service

     service docker restart
     service kubelet restart

6, you can view the certificate expiration date

kubeadm  alpha  certs check-expiration

Guess you like

Origin www.cnblogs.com/kuailewangzi1212/p/12305705.html