You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
在使用kk安装完成k8s集群后,不进行任何操作,等待所有pod就绪并且稳定运行一段时间后使用reboot命令重启服务器,重启后无法正常使用kubectl get nodes等命令获取集群信息,排查问题为DNS错误,没有将lb.kubesphere.local写入hosts或没有配置正确的本地DNS,如果修改kube config配置文件,将域名改为控制平面节点的IP地址,那么可以正常获取到nodes信息
Relevant log output
root@node1:~# kubectl get nodes
Unable to connect to the server: dial tcp: lookup lb.kubesphere.local on 127.0.0.53:53: server misbehaving
root@node1:~# nslookup lb.kubesphere.local;; Got SERVFAIL reply from 127.0.0.53
Server: 127.0.0.53
Address: 127.0.0.53#53
** server can't find lb.kubesphere.local: SERVFAILroot@node1:~# dig lb.kubesphere.local; <<>> DiG 9.18.30-0ubuntu0.22.04.2-Ubuntu <<>> lb.kubesphere.local;; global options: +cmd;; Got answer:;; WARNING: .local is reserved for Multicast DNS;; You are currently testing what happens when an mDNS query is leaked to DNS;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 42177;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 65494;; QUESTION SECTION:;lb.kubesphere.local. IN A;; Query time: 0 msec;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP);; WHEN: Wed Apr 23 17:47:59 CST 2025;; MSG SIZE rcvd: 48root@node1:~# cat /etc/hosts# Your system has configured 'manage_etc_hosts' as True.# As a result, if you wish for changes to this file to persist# then you will need to either# a.) make changes to the master file in /etc/cloud/templates/hosts.debian.tmpl# b.) change or remove the value of 'manage_etc_hosts' in# /etc/cloud/cloud.cfg or cloud-config from user-data#127.0.1.1 kube-node1 kube-node1127.0.0.1 localhost# The following lines are desirable for IPv6 capable hosts::1 localhost ip6-localhost ip6-loopbackff02::1 ip6-allnodesff02::2 ip6-allrouters
Additional information
No response
The text was updated successfully, but these errors were encountered:
# Your system has configured 'manage_etc_hosts' as True.
# As a result, if you wish for changes to this file to persist
# then you will need to either
# a.) make changes to the master file in /etc/cloud/templates/hosts.debian.tmpl
# b.) change or remove the value of 'manage_etc_hosts' in
# /etc/cloud/cloud.cfg or cloud-config from user-data
#
127.0.1.1 node1
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
# kubekey hosts BEGIN
10.111.0.1 node1.xxx.com node1
10.111.0.2 node2.xxx.com node2
10.111.0.1 lb.kube.xxx.com
# kubekey hosts END
What is version of KubeKey has the issue?
kk version: &version.Info{Major:"3", Minor:"1", GitVersion:"v3.1.8", GitCommit:"dbb1ee4aa1ecf0586565ff3374427d8a7d9b327b", GitTreeState:"clean", BuildDate:"2025-03-26T04:49:07Z", GoVersion:"go1.19.2", Compiler:"gc", Platform:"linux/amd64"}
What is your os environment?
Ubuntu 22.04
KubeKey config file
A clear and concise description of what happend.
在使用kk安装完成k8s集群后,不进行任何操作,等待所有pod就绪并且稳定运行一段时间后使用
reboot
命令重启服务器,重启后无法正常使用kubectl get nodes
等命令获取集群信息,排查问题为DNS错误,没有将lb.kubesphere.local写入hosts或没有配置正确的本地DNS,如果修改kube config配置文件,将域名改为控制平面节点的IP地址,那么可以正常获取到nodes信息Relevant log output
Additional information
No response
The text was updated successfully, but these errors were encountered: