我有一个相同的discussion在k3s github仓库中,但没有人回复。希望有人能在这里给出答案。
有文章讨论k3s的嵌入式etcd HA解决方案,例如this 。关键行为之一是在代理和主服务器之间添加负载均衡器解决方案(如本文的 EIP 或来自云提供商的 LB):
k3s agent --> load balancer --> master
还有architecture of k3s还表明需要固定注册地址。
虽然,经过一些研究,我发现 k3s(至少 v1.21.5+k3s2)有一个内部代理负载均衡器(配置在 /var/lib/rancher/k3s/agent/etc/k3s-agent- load-balancer.yaml
),它将自动更新其中的主 k8s api 服务器列表。那么外部负载均衡器是不必要的吗?
最佳答案
我从 k3s 讨论中得到了回复:
https://github.com/k3s-io/k3s/discussions/4488#discussioncomment-1719009
Our documentation lists a requirement for a "fixed registration endpoint" so that nodes do not rely on a single server being online in order to join the cluster. This endpoint could be a load-balancer or a DNS alias, it's up to you. This is only needed when nodes are registering to the cluster; once they have successfully joined, they use the client load-balancer to communicate directly with the servers without going through the registration endpoint.
我认为这足以回答这个问题。
关于kubernetes - k3s 嵌入式 etcd HA 解决方案不需要负载均衡器吗,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70030884/