Skip to content

Add cluster version rollback support with rollbackConfig#8780

Merged
michaelhtm merged 2 commits into
eksctl-io:mainfrom
michaelhtm:feature/cluster-version-rollback
Jul 1, 2026
Merged

Add cluster version rollback support with rollbackConfig#8780
michaelhtm merged 2 commits into
eksctl-io:mainfrom
michaelhtm:feature/cluster-version-rollback

Conversation

@michaelhtm

@michaelhtm michaelhtm commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Description

Allow rolling back (downgrading) an EKS cluster's Kubernetes version by
one minor version via eksctl upgrade cluster --version <lower>.

  • ResolveUpgradeVersion now resolves both the next and previous supported
    versions, permits a single-version downgrade (N->N-1), and rejects
    multi-version downgrades and downgrading the oldest supported version,
    replacing the old "cannot upgrade to a lower version" error.
  • Add metadata.rollbackConfig.timeoutMinutes (api.RollbackConfig) to
    configure how long EKS waits before automatically cancelling an
    in-progress version update. Validated to the API's 120-10080 range
    and plumbed into UpdateClusterVersion.
  • Bump aws-sdk-go-v2/service/eks to v1.88.0, which ships RollbackConfig
    on UpdateClusterVersion (and the CancelUpdate operation); regenerate
    the awsapi EKS interface, EKS mock, deepcopy helpers, and schema.

Checklist

  • Added tests that cover your change (if possible)
  • Added/modified documentation as required (such as the README.md, or the userdocs directory)
  • Manually tested
  • Made sure the title of the PR is a good description that can go into the release notes
  • (Core team) Added labels for change area (e.g. area/nodegroup) and kind (e.g. kind/improvement)

BONUS POINTS checklist: complete for good vibes and maybe prizes?! 🤯

  • Backfilled missing tests for code in same general area 🎉
  • Refactored something and made the world a better place 🌟

@github-actions

Copy link
Copy Markdown
Contributor

Hello michaelhtm 👋 Thank you for opening a Pull Request in eksctl project. The team will review the Pull Request and aim to respond within 1-10 business days. Meanwhile, please read about the Contribution and Code of Conduct guidelines here. You can find out more information about eksctl on our website

@michaelhtm michaelhtm added kind/feature New feature or request area/upgrades labels Jun 30, 2026
Allow rolling back (downgrading) an EKS cluster's Kubernetes version by
one minor version via `eksctl upgrade cluster --version <lower>`.

- ResolveUpgradeVersion now resolves both the next and previous supported
  versions, permits a single-version downgrade (N->N-1), and rejects
  multi-version downgrades and downgrading the oldest supported version,
  replacing the old "cannot upgrade to a lower version" error.
- Add metadata.rollbackConfig.timeoutMinutes (api.RollbackConfig) to
  configure how long EKS waits before automatically cancelling an
  in-progress version update. Validated to the API's 120-10080 range
  and plumbed into UpdateClusterVersion.
- Bump aws-sdk-go-v2/service/eks to v1.88.0, which ships RollbackConfig
  on UpdateClusterVersion (and the CancelUpdate operation); regenerate
  the awsapi EKS interface, EKS mock, deepcopy helpers, and schema.
@michaelhtm michaelhtm force-pushed the feature/cluster-version-rollback branch from 9d95743 to 4418bd1 Compare July 1, 2026 01:02
}

// Handle upgrade
if c > 0 {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about c==0 case? If the current and desired version are same I believe this is going to downgrade path, which may be incorrect

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 177 handles the early return case for desired == currentVersion

Comment thread pkg/eks/update.go Outdated
Address review feedback: when metadata.rollbackConfig omits timeoutMinutes
we were sending an empty "rollbackConfig": {} to UpdateClusterVersion. The
API tolerates it (it applies its default timeout either way), but it is
redundant, so only set input.RollbackConfig when there is a value to send.
@michaelhtm michaelhtm force-pushed the feature/cluster-version-rollback branch from 1c668a2 to c4d88bc Compare July 1, 2026 16:48

@sapphirew sapphirew left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @michaelhtm! lgtm, despite a non-blocking comment.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could consider adding validations around the rest of pre-requisites for version rollback https://docs.aws.amazon.com/eks/latest/userguide/rollback-cluster.html

@michaelhtm michaelhtm merged commit bb3c668 into eksctl-io:main Jul 1, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/upgrades kind/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants