cloudposse / terraform-aws-eks-node-group

Terraform module to provision a fully managed AWS EKS Node Group
https://cloudposse.com/accelerate
Apache License 2.0
91 stars 128 forks source link

Update node group to use new kubernetes version (new ami) #104

Closed mayaaravotwm closed 2 years ago

mayaaravotwm commented 2 years ago

Describe the Bug

I had eks cluster (v1.20) with “bottlerocket-aws-k8s-1.20-x86_64-v1.5.2-1602f3a8” ami node group. after upgrade the cluster to 1.21, I can’t get the nodes to update their ami to “bottlerocket-aws-k8s-1.21-x86_64-v1.5.2-1602f3a8". Even hard-coded, terraform doesn’t see any change in the module. Any advice?

Expected Behavior

We should be able to update the node group using the module to another kubernetes version.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Create eks cluster with other version then the latest.
  2. Create node groups with the same kubernetes version.
  3. Upgrade the eks cluster.
  4. Pass the new kubernetes version to the node group module and try to upgrade them as well. you will get 'Apply complete! Resources: 0 added, 0 changed, 0 destroyed.' even the version is different

Screenshots

image image

mayaaravotwm commented 2 years ago

i was manage to fix that by specify only those vars:

ami_type = "BOTTLEROCKET_x86_64"
kubernetes_version             = [module.eks_cluster.eks_cluster_version]

which means i didn’t define var.ami_release_version after that the upgrade worked :slightly_smiling_face: