创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
发帖前请点击 发表主题 右边的 预览(👀) 按钮,确保帖子格式正确。
操作系统信息
物理机
操作系统:Ubuntu22.04
集群信息:
master节点 4C12G IP:10.10.30.120 变更为10.10.30.122
worker节点 4C6G IP:10.10.30.121
Kubernetes版本信息
例如:v1.26.5
问题是什么
大致报错:
Oct 10 02:31:11 master kubelet[26914]: E1010 02:31:11.439169 26914 reflector.go:140] vendor/k8s.io/client-go/informers/factory.go:150: Failed to watch *v1.Service: failed to list *v1.Service: Get “https://lb.kubesphere.local:6443/api/v1/services?limit=500&resourceVersion=0”: dial tcp 10.10.30.122:6443: connect: connection refused
Oct 10 02:31:12 master kubelet[26914]: I1010 02:31:12.321070 26914 kubelet_node_status.go:70] “Attempting to register node” node=“master”
Oct 10 02:31:12 master kubelet[26914]: E1010 02:31:12.321369 26914 kubelet_node_status.go:92] “Unable to register node with API server” err="Post \“https://lb.kubesphere.local:6443/api/v1/nodes\”: dial tcp 10.10.30.122:6443: connect: connection refused" node=“master”
Oct 10 02:31:12 master kubelet[26914]: E1010 02:31:12.868657 26914 eviction_manager.go:261] “Eviction manager: failed to get summary stats” err="failed to get node info: node \“master\” not found"
Oct 10 02:31:13 master kubelet[26914]: I1010 02:31:13.844055 26914 scope.go:115] “RemoveContainer” containerID=“01de275ba676fadabfae3c9785ec50d705b2f2d75d3f488cefe42ec09bbb7a5e”
已经操作:
删掉之前的证书重新执行
kubeadm init phase certs all \
--apiserver-advertise-address 10.10.30.122 \
--apiserver-cert-extra-sans "10.10.30.122,10.10.30.121" \
--cert-dir "/etc/kubernetes/pki"
后重启kubelet,还是无法正常请求到6443,kk部署是否有解决的方案?