About Kubernetes cluster in AWS EC2 instances

8/24/2018

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???? if a control node is restarting and not have elastic IP its change, and a big number of issues starts. I want to prevent this problem, or at least after deploy change my control node IP.

-- conde
amazon-ec2
amazon-web-services
kubernetes

2 Answers

5/17/2020

At the time of writing this, there isn't any out-of-box solution from kops.

But you can try k8s-eip for this if your use case isn't critical. I wrote this tool for my personal cluster to save cost.

-- Ming
Source: StackOverflow

8/24/2018

I want to install a Kubernetes cluster, but I want assign Elastic IP at least to my control and etcd nodes

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. So it does one step better than just an EIP and assigns one EIP per Availability Zone (AZ), along with a stable DNS name. 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

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

-- mdaniel
Source: StackOverflow