7.7. 无法加入集群的 worker 节点故障排除
安装程序置备的集群使用 DNS 服务器部署,其中包含 api-int.<cluster_name>.<base_domain>
URL 的 DNS 条目。如果集群中的节点使用外部或上游 DNS 服务器解析 api-int.<cluster_name>.<base_domain>
URL,且没有这样的条目,则 worker 节点可能无法加入集群。确保集群中的所有节点都可以解析域名。
流程
添加 DNS A/AAAA 或 CNAME 记录,以内部标识 API 负载均衡器。例如,在使用 dnsmasq 时,修改
dnsmasq.conf
配置文件:sudo nano /etc/dnsmasq.conf
$ sudo nano /etc/dnsmasq.conf
Copy to Clipboard Copied! Toggle word wrap Toggle overflow address=/api-int.<cluster_name>.<base_domain>/<IP_address> address=/api-int.mycluster.example.com/192.168.1.10 address=/api-int.mycluster.example.com/2001:0db8:85a3:0000:0000:8a2e:0370:7334
address=/api-int.<cluster_name>.<base_domain>/<IP_address> address=/api-int.mycluster.example.com/192.168.1.10 address=/api-int.mycluster.example.com/2001:0db8:85a3:0000:0000:8a2e:0370:7334
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 添加 DNS PTR 记录以内部标识 API 负载均衡器。例如,在使用 dnsmasq 时,修改
dnsmasq.conf
配置文件:sudo nano /etc/dnsmasq.conf
$ sudo nano /etc/dnsmasq.conf
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ptr-record=<IP_address>.in-addr.arpa,api-int.<cluster_name>.<base_domain> ptr-record=10.1.168.192.in-addr.arpa,api-int.mycluster.example.com
ptr-record=<IP_address>.in-addr.arpa,api-int.<cluster_name>.<base_domain> ptr-record=10.1.168.192.in-addr.arpa,api-int.mycluster.example.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 重启 DNS 服务器。例如,在使用 dnsmasq 时执行以下命令:
sudo systemctl restart dnsmasq
$ sudo systemctl restart dnsmasq
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
这些记录必须可以从集群中的所有节点解析。