记录一个奇葩的问题:k8s集群中master节点上部署一个单节点的nacos,导致master节点状态不在线

情况详细描述;
k8s集群,一台master,两台worker
在master节点上部署一个单节点的nacos,导致master节点状态不在线(不论是否修改nacos的默认端口号都会导致master节点不在线)。
但是在worker节点上就可以。

报错信息如下:

Message from syslogd@localhost at Jun  2 11:08:51 ...
 haproxy[1127]: proxy kube-master has no server available!

Message from syslogd@localhost at Jun  2 11:08:51 ...
 haproxy[1125]: proxy kube-master has no server available!

Message from syslogd@localhost at Jun  2 11:08:51 ...
 haproxy[1128]: proxy kube-master has no server available!

初步怀疑是nacos启动后导致master节点运行使用的haproxy出现问题,才导致的master节点不在线。

暂定的解决办法是在禁止调度master节点,此时就可以在master节点上运行nacos,同时master节点也在线。

# 禁止调度master节点
kubectl cordon develop-master-1
# 恢复调度master节点
kubectl uncordon develop-master-1
原文地址:https://www.cnblogs.com/sanduzxcvbnm/p/14840774.html