- 最新
- 最多得票
- 最多評論
Hello.
we need to add the rules again to the ALB every day.
I don't think it's necessary to add ALB listener rules every day if you just want to stop EC2.
In other words, I think there is no problem just keeping EC2 and the target group connected to the ALB and stopping and starting EC2 as needed.
If you use EventBridge scheduler etc., it is possible to automate the start and stop of EC2.
https://dev.to/aws-builders/easy-setup-for-ec2-stop-jobs-with-amazon-eventbridge-scheduler-4lpg
In some cases, I think it would be easier to manage by setting up EC2's AutoScaling to scale according to a schedule.
https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-scheduled-scaling.html
Thanks for responding!
To clarify, we are actually not doing add/remove of rules everyday. The ALB was created by creating an ingress with class "internet-facing" (This is because we have some services running in k8s as well).. And to that ALB we are adding target-groups pointing to EC2 servers. And we shut down both EC2 and the k8s nodes (just the underlying node pool, the master remains up).
When start everything up in the morning (we are using scheduled lambdas to do this), the k8s ingress works as expected but the rules we have manually added for the EC2 instances go away and we have to manually add them again.
相關內容
- 已提問 6 個月前
- AWS 官方已更新 2 年前
- AWS 官方已更新 1 年前
- AWS 官方已更新 2 年前