2

I have a kubernetes cluster with HypriotOS which I moved to another IP range.

I have updated the /etc/kubernetes/admin.conf in one of the nodes but when I rune kubeadm it fails the certificate:

$ kubeadm config view
Get https://10.99.1.10:6443/api/v1/namespaces/kube-system/configmaps/kubeadm-config: x509: certificate is valid for 10.96.0.1, 192.168.88.251, not 10.99.1.10

How I can create a new certificate?

Is a better way of changing clusters IP addresses?

1

You need to add the new ip 10.99.1.10 to the pki (This command vary in different versions this is for v1.12):

kubeadm alpha phase certs all --apiserver-advertise-address 0.0.0.0
--apiserver-cert-extra-sans=10.96.0.1,192.168.88.251,10.99.1.10
  • I do not have the cluster anymore so I will accept your answer unless someone comment it is not valid – albert Jul 15 at 10:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.