Update EBS EKS add-on via Terraform
Hi,
Let’s presume that you are managing your EKS add-ons via Terraform and you see in a console that there is an update. You write down a version and copy it to your Terraform code:
After that, you run terraform apply. It’s worth mentioning resolve_conflicts options, as per AWS documentation:
- None — Amazon EKS doesn’t change the value. The update might fail.
- Overwrite — Amazon EKS overwrites the changed value back to the Amazon EKS default value.
- Preserve — Amazon EKS preserves the value. If you choose this option, we recommend that you test any field and value changes on a non-production cluster before updating the add-on on your production cluster.
The link is here: https://docs.aws.amazon.com/eks/latest/APIReference/API_UpdateAddon.html
If you didn’t change the add-on settings via Amazon EKS add-on API, the best option is OVERWRITE. In case of some changes, and when you want these changes not to be overwritten, please stick with PRESERVE.
So I apply those updates, let’s see what’s happening in a cluster. It will only restart the ebs-csi-node and ebs-csi controller, the update will not restart the nodes itself.
The update is done within a few minutes. In a console, you can also check the update history:
That’s all, you have the updated add-on, and everything is working as expected.
Thank you for your time.