Skip to content

Commit

Permalink
Add release note for terraform launch template migration
Browse files Browse the repository at this point in the history
  • Loading branch information
rifelpet committed Dec 15, 2020
1 parent 52ea87d commit 8ecdc74
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions docs/releases/1.19-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ has been updated by a newer version of kOps unless it is given the `--allow-kops

* See note about [Openstack Cinder plugin](#openstack-cinder-plugin) above.

* Terraform users, in order to prevent downtime you will have to remove the state of any existing ELB or TargetGroup attatchments from your Terraform state file. This is due to migrating the attachments to the in-line `aws_autoscaling_group` fields. See the [terraform documentation](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group) for more information about the difference. This migration is required due to a bug described in [#9913](https://github.com/kubernetes/kops/issues/9913).
* Terraform 0.12 users on AWS, in order to prevent downtime you will have to remove the state of any existing ELB or TargetGroup attachments from your Terraform state file. This is due to migrating the attachments to the in-line `aws_autoscaling_group` fields. See the [terraform documentation](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/autoscaling_group) for more information about the difference. This migration is required due to a bug described in [#9913](https://github.com/kubernetes/kops/issues/9913).

To prevent downtime, follow these steps with the new version of Kops:
```
To prevent downtime, follow these steps with the new version of Kops:
```bash
kops update cluster --target terraform ...
terraform plan
terraform state list | grep aws_autoscaling_attachment | xargs -L1 terraform state rm
Expand All @@ -91,6 +91,16 @@ To prevent downtime, follow these steps with the new version of Kops:
terraform apply
```

* Terraform 0.12 users on AWS migrating clusters from Launch Configurations to Launch Templates may need to remove the state of the old Launch Configuration. This is due to potential errors with Terraform attempting to delete the Launch Configuration before updating the AutoScalingGroup to use the Launch Template. The Launch Configurations will need to be manually deleted afterwards.
More information including detailed remediation steps is available in [#10017](https://github.com/kubernetes/kops/issues/10017).
```bash
kops update cluster --target terraform ...
terraform state list | grep aws_launch_configuration | xargs -L1 terraform state rm
terraform plan
# Ensure launch configurations are not being destroyed
terraform apply
```

* If you are using Terraform with an additional .tf file and using "aws_autoscaling_attachment" to attach additional Load Balancers or ALB/NLB Target Groups you'll need to migrate to [attaching them through the InstanceGroup spec instead](https://kops.sigs.k8s.io/instance_groups/#externalloadbalancers).

* AWS clusters using an ACM Certificate on the API ELB (`.spec.api.loadBalancer.sslCertificateID`) will need to migrate from Classic LoadBalancer (CLB) to Network LoadBalancer (NLB) prior to upgrading to Kubernetes 1.19 by setting `.spec.api.loadBalancer.class: Network`.
Expand Down

0 comments on commit 8ecdc74

Please sign in to comment.