AWS AutoScaling with Static IP Addresses

Can AutoScaling be done with static IPs in AWS? Newly created instances must either have a predefined IP address or select from a pool of predefined IP addresses.

We are trying to set up ZooKeeper for production, with 5 instances of zooKeeper. Each of them must have a static IP address, which must be hardcoded in the AMI / Databag Kafka that we use. It should also support AutoScaling, so if one of the zooKeeper node is omitted, a new one is generated with the same IP address or from the IP address pool. To do this, we decided to go with 1 instance of zoo-keeper to the AutoScaling group, but the problem is related to IP.

If this is the wrong way, suggest the right way. Thanks in advance!

+4
source share
1 answer

One method would be to maintain user script data for each instance, and each instance would assign elastic IP addresses from the set of EIPs assigned for this purpose. This user script data will be specified in the ASG startup configuration and will be run at startup.

Say the script user is called "/scripts/assignEIP.sh" using the AWS CLI, you will need to consult the pool to see which ones are available and which are not (already in use). He then assumes one of the available EIPS.

IP- IP- S3 .

, IAM, EIP .

+3

Source: https://habr.com/ru/post/1628769/


All Articles