-
Notifications
You must be signed in to change notification settings - Fork 4.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loadbalancer removed from autoscaling groups when using terraform #9913
Comments
lundbird
changed the title
Autoscaling groups remove loadbalancer
Loadbalancer removed from autoscaling groups
Sep 10, 2020
lundbird
changed the title
Loadbalancer removed from autoscaling groups
Loadbalancer removed from autoscaling groups when using terraform
Sep 29, 2020
I am facing this same issue with below versions:
Using provider version |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1. What
kops
version are you running? The commandkops version
, will displaythis information.
1.18.1
2. What Kubernetes version are you running?
kubectl version
will print theversion if a cluster is running or provide the Kubernetes version specified as
a
kops
flag.1.16.12
3. What cloud provider are you using?
aws
4. What commands did you run? What is the simplest way to reproduce this issue?
kops update cluster --out=terraform --target=terraform
5. What happened after the commands executed?
Planning the output terraform shows that the masters and the bastion lose access to their load balancer. Applying this config will cause the apiserver to become out of service.
**7. Please provide your cluster manifest.
9. Anything else do we need to know?
The latest docs for the aws terraform provider (https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_attachment) say that you need to add a lifecycle hook to the terraform autoscaling group resource if using the autoscaling_attachment and not defining in-line loadbalancer in the ASG. This is not present on the generated terraform output by kops.
As a temporary workaround I have created a file, asg_override.tf, where I add in the lifecycle hook to the resource as follows for each autoscaling_group resource:
This will overlay with the kops generated resource so that the loadbalancer will not be removed.
The text was updated successfully, but these errors were encountered: