简体   繁体   English

关于 AWS EC2 实例中的 Kubernetes 集群

[英]About Kubernetes cluster in AWS EC2 instances

looking a guide to install kubernetes over AWS EC2 instances using kops Link I want to install a Kubernetes cluster, but I want assign Elastic IP at least to my control and etcd nodes, is possible set an IP to some configuration file then my cluster is created with a specific IP in my control node and my etcd node????寻找使用 kops Link在 AWS EC2 实例上安装 kubernetes 的指南 我想安装 Kubernetes 集群,但我想至少将弹性 IP 分配给我的控制和 etcd 节点,可以将 IP 设置到某个配置文件然后创建我的集群在我的控制节点和我的 etcd 节点中有一个特定的 IP???? if a control node is restarting and not have elastic IP its change, and a big number of issues starts.如果控制节点正在重新启动并且没有弹性 IP,则它会发生变化,并且会出现大量问题。 I want to prevent this problem, or at least after deploy change my control node IP.我想防止这个问题,或者至少在部署后更改我的控制节点 IP。

I want to install a Kubernetes cluster, but I want assign Elastic IP at least to my control and etcd nodes我想安装一个 Kubernetes 集群,但我想至少为我的控制和 etcd 节点分配弹性 IP

The correct way, and the way almost every provisioning tool that I know of does this, is to use either an Elastic Load Balancer (ELB) or the new Network Load Balancer (NLB) to put an abstraction layer in front of the master nodes for exactly that reason.正确的方法,也是我所知道的几乎所有配置工具的方法,是使用弹性负载均衡器 (ELB) 或新的网络负载均衡器 (NLB) 在主节点前面放置一个抽象层,以用于正是这个原因。 So it does one step better than just an EIP and assigns one EIP per Availability Zone (AZ), along with a stable DNS name.因此,它比仅仅一个 EIP 做得更好,并为每个可用区 (AZ) 分配一个 EIP,以及一个稳定的 DNS 名称。 It's my recollection that the masters can also keep themselves in sync with the ELB (unknown about the NLB, but certainly conceptually possible), so if new ones come online they register with the ELB automatically我记得masters也可以让自己和ELB保持同步(不知道NLB,但概念上肯定是可能的),所以如果有新的上线,他们会自动注册到ELB

Then, a similar answer for the etcd nodes, and for the same reason, although as far as I know etcd has no such ability to keep the nodes in sync with the fronting ELB/NLB so that would need to be done with the script that provisions any new etcd nodes然后,对于 etcd 节点的类似答案,出于同样的原因,尽管据我所知,etcd 没有这种能力来使节点与前端 ELB/NLB 保持同步,因此需要使用脚本来完成提供任何新的 etcd 节点

At the time of writing this, there isn't any out-of-box solution from kops.在撰写本文时,kops 还没有任何开箱即用的解决方案。

But you can try k8s-eip for this if your use case isn't critical.但如果您的用例不重要,您可以为此尝试使用 k8s-eip I wrote this tool for my personal cluster to save cost.我为我的个人集群编写了这个工具以节省成本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM