大网数据广告活动
服务器运维问答

Kubernetes cluster change ip

· 52CE 我爱测

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://1…

问题原文

原帖链接 · albert · CC BY-SA 3.0

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?

已采纳解答

原帖链接 · gixnex · CC BY-SA 4.0

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

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-04-07)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。