在实现 HA kubernetes 集群时将 master1 和 master2 添加到负载均衡器
adding master1 and master2 to load balancer in implementing HA kubernetes cluster
我正在探索使用 kubernetes 和 jenkins 实现 CI/CD 管道。我计划使用多主 kubernetes 集群 - HA 集群。并在主节点上使用 etcd 集群。我正在按照以下教程进行学习,
https://kubernetes.io/docs/setup/independent/high-availability/
我在这里阅读时发现 - 在 master1 和 master2 上 运行 kubeadm init 之后,有一个步骤“将 master1 和 master2 添加到负载均衡器” .
实际上我在这一步很困惑,我需要使用另一个虚拟机作为负载平衡器吗?或者 master0 master1 和 master2 设置默认提供一个负载均衡器?
我不清楚关于HA kubernetes集群中负载均衡器的这一步。谁能澄清我的困惑?
简短的回答是肯定的,您必须为 master 创建 Load Balancer 并手动将其他 master 添加到 LB 池。
这是“Building High-Availability Clusters”文档的一部分,"Replicating API Servers" 部分:
Load balancing
At this point, you should have 3 apiservers all working correctly. If you set up a network load balancer, you should
be able to access your cluster via that load balancer, and see traffic
balancing between the apiserver instances. Setting up a load balancer
will depend on the specifics of your platform, for example
instructions for the Google Cloud Platform can be found here.
Note, if you are using authentication, you may need to regenerate your
certificate to include the IP address of the balancer, in addition to
the IP addresses of the individual nodes.
For pods that you deploy into the cluster, the kubernetes service/dns
name should provide a load balanced endpoint for the master
automatically.
For external users of the API (e.g. the kubectl command line
interface, continuous build pipelines, or other clients) you will want
to configure them to talk to the external load balancer’s IP address.
另请在 Creating HA clusters with kubeadm 文档中找到与 云负载均衡器 和 现场负载均衡器 相关的两个部分。
(它隐藏在 "Acquire etcd cert" 上方)在 "Choose one.../Cloud/On-Site" 部分。
我正在探索使用 kubernetes 和 jenkins 实现 CI/CD 管道。我计划使用多主 kubernetes 集群 - HA 集群。并在主节点上使用 etcd 集群。我正在按照以下教程进行学习,
https://kubernetes.io/docs/setup/independent/high-availability/
我在这里阅读时发现 - 在 master1 和 master2 上 运行 kubeadm init 之后,有一个步骤“将 master1 和 master2 添加到负载均衡器” .
实际上我在这一步很困惑,我需要使用另一个虚拟机作为负载平衡器吗?或者 master0 master1 和 master2 设置默认提供一个负载均衡器?
我不清楚关于HA kubernetes集群中负载均衡器的这一步。谁能澄清我的困惑?
简短的回答是肯定的,您必须为 master 创建 Load Balancer 并手动将其他 master 添加到 LB 池。
这是“Building High-Availability Clusters”文档的一部分,"Replicating API Servers" 部分:
Load balancing
At this point, you should have 3 apiservers all working correctly. If you set up a network load balancer, you should be able to access your cluster via that load balancer, and see traffic balancing between the apiserver instances. Setting up a load balancer will depend on the specifics of your platform, for example instructions for the Google Cloud Platform can be found here.Note, if you are using authentication, you may need to regenerate your certificate to include the IP address of the balancer, in addition to the IP addresses of the individual nodes.
For pods that you deploy into the cluster, the kubernetes service/dns name should provide a load balanced endpoint for the master automatically.
For external users of the API (e.g. the kubectl command line interface, continuous build pipelines, or other clients) you will want to configure them to talk to the external load balancer’s IP address.
另请在 Creating HA clusters with kubeadm 文档中找到与 云负载均衡器 和 现场负载均衡器 相关的两个部分。
(它隐藏在 "Acquire etcd cert" 上方)在 "Choose one.../Cloud/On-Site" 部分。