-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Managed node group upgrade using Bottlerocket fails #4423
Comments
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Not stale, we need to look into this. |
@Anorlondo448 are you still having this issue? does the latest eksctl version help? |
I've managed to reproduce this issue: # NOTE: Bottlerocket AMI might not be available in all regions.
# Please check AWS official doc or below link for more details
# https://github.com/bottlerocket-os/bottlerocket/blob/develop/QUICKSTART.md#finding-an-ami
# A simple example of ClusterConfig object with Bottlerocket settings:
---
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: jk
region: us-west-2
version: "1.20"
managedNodeGroups:
- name: mng1
instanceType: m5.xlarge
desiredCapacity: 1
amiFamily: Bottlerocket
labels:
"network-locality.example.com/public": "true"
bottlerocket:
enableAdminContainer: true
settings:
motd: "Hello, eksctl!" Upgrading this to I tried changing https://github.com/weaveworks/eksctl/blob/7565de70d46cd0930929b834527e5a1368ecb46e/pkg/managed/service.go#L345 to query for For AL2 we query:
However I cannot find the equivalent query for bottlerocket:
Looking at the docs here https://docs.aws.amazon.com/eks/latest/userguide/retrieve-ami-id-bottlerocket.html it suggests
as a way to query for the
Why do we fetch the release version?One thing I don't understand is why we are updating the
Reading the docs it appears that its much simpler for us to just update I've confirmed manually the setting the |
I'm going to start working on a PR to migrate this to update the @cPu1 do you have any context on why we do this approach? |
We query the latest release version and set it explicitly in the CloudFormation template to force CFN to apply the changeset if nothing else has changed in the template. Otherwise, if you attempt to upgrade a nodegroup that's on the same Kubernetes version as the control plane, the changeset will be empty and it won't be upgraded to the latest release version. This is required because of CloudFormation's declarative nature. |
When would you wan't to upgrade a nodegroups thats already on the same k8s version? When running something like |
EKS also publishes new AMIs for existing Kubernetes versions.
It won't be a no-op if there's a newer release version available for the current version of Kubernetes for the specified nodegroup. |
👍 gotcha so for |
After chatting with some folks at AWS the bottlerocket query to fetch the release version is: |
So I've been testing out the fix and seeing some strange behaviour:
You can see how the value adjusts per k8s version. However for bottlerocket:
It returns the same value for different k8s versions, and doesn't seem to follow the k8s versioning pattern observed for AmazonLinux2. |
I'm going to switch back to the approach of updating
|
I was aware that a nodegroup update cannot change fields other than |
yes this field was definitely the cause of the problem |
Hey @cPu1 , Is there any workaround you would suggest as we need updated latest AMI versions for the bottlerocket nodegroups as well. |
What were you trying to accomplish?
I tried upgrading a bottlerocket instance using
eksctl upgrade nodegroup
.And I specified
kubernetes-version
as an option.What happened?
Upgrade fails.
The release version of the AMI that can be obtained from the kubernetes version is output as invalid.
(See below)
How to reproduce it?
eksctl create nodegroup
.--kubernetes-version
ineksctl upgrade nodegroup
.--release-version
succeeds.Logs
Anything else we need to know?
In the following part, even the Bottlerocket AMI has acquired the AMI release version of Amazon Linux2.
https://github.com/weaveworks/eksctl/blob/7565de70d46cd0930929b834527e5a1368ecb46e/pkg/managed/service.go#L345
Versions
The text was updated successfully, but these errors were encountered: