如何解决MicroK8s 集群 API 在关闭节点时中断
我已经在 1.20 版上构建了这个 MicroK8s 3 节点集群。这是完美的工作。当我运行 microk8s status
时说:
feken@stor1:~$ sudo microk8s status
microk8s is running
high-availability: yes
datastore master nodes: 192.168.1.150:19001 192.168.1.151:19001 192.168.1.153:19001
datastore standby nodes: none
addons:
enabled:
dns # coredns
ha-cluster # Configure high availability on the current node
prometheus # Prometheus operator for monitoring and logging
现在为了测试高可用性(MicroK8s 所说的),我决定断开一个节点与网络的连接。嗯..这有一些意想不到的结果。我的 Pod 继续运行,但我无法再使用 API 做任何事情。 microk8s kubectl get nodes
坏了:
feken@stor1:~$ sudo microk8s kubectl get nodes
Error from server (Timeout): the server was unable to return a response in the time allotted,but may still be processing the request (get nodes)
我在桌面上使用的 Lens UI 工具也无法连接。
连接断开的节点后,一切又好了:
feken@stor1:~$ sudo microk8s kubectl get nodes
NAME STATUS ROLES AGE VERSION
stor1.singel.home Ready <none> 21h v1.20.1-34+e7db93d188d0d1
stor3.singel.home Ready <none> 21h v1.20.1-34+e7db93d188d0d1
stor2.singel.home Ready <none> 21h v1.20.1-34+e7db93d188d0d1
这不是我期望发生的事情..我需要做什么才能让这个设置真正成为 HA?有什么我想念的吗?还是这是故意的?
编辑: 再次尝试,现在它按预期工作了.. 不确定第一次发生了什么。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。