Skip to content

When EKS Nodegroup is deployed using Bottlerocket AMI type, update call fails #2644

@sudohikumar

Description

@sudohikumar

Describe the bug
When EKS Nodegroup is deployed using Bottlerocket AMI type, update call fails with version mismatch error.

Steps to reproduce
Applied the following

apiVersion: eks.services.k8s.aws/v1alpha1
kind: Nodegroup
metadata:
  name: eks-test
spec:
  amiType: BOTTLEROCKET_x86_64
  releaseVersion: 1.47.0-6154605b
  launchTemplate:
    name: eks-lt
    version: "1"
  capacityType: ON_DEMAND
  clusterRef:
    from:
      namespace: example
  instanceTypes:
  - m5.2xlarge
  - m6a.2xlarge
  - m6i.2xlarge
  - m7i.2xlarge
  - m7a.2xlarge
  - m5a.2xlarge
  labels:
    nodegroup: eks-test
  name: eks-test
  nodeRole: <Redacted>
  scalingConfig:
    desiredSize: 0
    maxSize: 1
    minSize: 0
  subnets:
  - subnet-1
  taints:
  - effect: NO_SCHEDULE
    key: nodegroup-test
    value: eks-test
  updateConfig:
    maxUnavailable: 1

it got synced successfully but controller changes the spec field as follows

apiVersion: eks.services.k8s.aws/v1alpha1
kind: Nodegroup
metadata:
  annotations:
    eks.services.k8s.aws/force-update-version: "true"
    kubectl.kubernetes.io/last-applied-configuration: |
      -----
  creationTimestamp: "2025-09-29T14:09:49Z"
  finalizers:
  - finalizers.eks.services.k8s.aws/Nodegroup
  generation: 3
  name: eks-test
spec:
  amiType: BOTTLEROCKET_x86_64
  releaseVersion: 1.47.0-6154605b
  launchTemplate:
    name: eks-lt
    version: "1"
  capacityType: ON_DEMAND
  clusterRef:
    from:
      namespace: example
  instanceTypes:
  - m5.2xlarge
  - m6a.2xlarge
  - m6i.2xlarge
  - m7i.2xlarge
  - m7a.2xlarge
  - m5a.2xlarge
  labels:
    nodegroup: eks-test
  name: eks-test
  nodeRole: <Redacted>
  scalingConfig:
    desiredSize: 0
    maxSize: 1
    minSize: 0
  subnets:
  - subnet-1
  taints:
  - effect: NO_SCHEDULE
    key: nodegroup-test
    value: eks-test
  updateConfig:
    maxUnavailable: 1
  version: "1.32"

Notice the version at the end added.
But the resource goes into terminal condition as follows (tried to update launch template version)

status:
  ackResourceMetadata:
    arn: <ARN>
    ownerAccountID: <AccountID>
    region: <Region>
  conditions:
  - lastTransitionTime: "2025-09-29T14:11:11Z"
    status: "True"
    type: ACK.ReferencesResolved
  - lastTransitionTime: "2025-09-29T14:11:11Z"
    status: "True"
    type: ACK.ResourceSynced
  - message: 'version and release version do not match: 1.32 and 1.47'
    status: "True"
    type: ACK.Terminal
  createdAt: "2025-09-29T14:09:52Z"
  desiredSize: 0
  health: {}
  modifiedAt: "2025-09-29T14:10:39Z"
  resources:
    autoScalingGroups:
    - name: <ASG Name>
  status: ACTIVE

The error comes from https://github.com/aws-controllers-k8s/eks-controller/blob/main/pkg/resource/nodegroup/hook.go#L345-L349. I feel the check here is not correct for Bottlerocket kind of AMIs since bottlerocket version is not aligned with k8s version (for example, for version 1.32, bottlerocket version can be 1.47.xxxxxx). Hence, this will keep on failing.

Expected outcome
Update is triggered.

Environment

  • Kubernetes version - 1.32
  • Using EKS (yes/no), if so version? - Yes
  • AWS service targeted (S3, RDS, etc.) - EKS Nodegroup

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.service/eksIndicates issues or PRs that are related to eks-controller.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions