4

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?

albert
  • 153
  • 1
  • 7

1 Answers1

3

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
gixnex
  • 133
  • 9