Skip to content
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

CLI versions 1.20.9 and 2.2.24 shipped a breaking change in a dot release #6308

Closed
2 tasks done
dylanlingelbach opened this issue Jul 30, 2021 · 8 comments · Fixed by #6476
Closed
2 tasks done

CLI versions 1.20.9 and 2.2.24 shipped a breaking change in a dot release #6308

dylanlingelbach opened this issue Jul 30, 2021 · 8 comments · Fixed by #6476
Labels
bug This issue is a bug. community customization Issues related to CLI customizations (located in /awscli/customizations) eks-kubeconfig released

Comments

@dylanlingelbach
Copy link

Confirm by changing [ ] to [x] below to ensure that it's a bug:

Describe the bug
Versions 1.20.9 and 2.2.24 shipped a breaking change to EKS support by changing the supported k8s API value from v1alpha1 to v1beta1. This breaks any existing kubeconfigs that have v1alpha1 specified in their kubeconfig.

The PR that changed this behavior clearly specified this is a breaking change, however the changed shipped in a point release, with no clear communication about it being a breaking change.

The error message you see when attempting to use a kubeconfig with an incorrect version is:

unable to use kubectl with the EKS cluster (check 'kubectl version'): Unable to connect to the server: getting credentials: exec plugin is configured to use API version client.authentication.k8s.io/v1alpha1, plugin returned version client.authentication.k8s.io/v1beta1

SDK version number
1.20.9
2.2.24

Platform/OS/Hardware/Device
What are you running the cli on?

Linux/Mac OS X

To Reproduce (observed behavior)

  1. Have a kubeconfig that uses eks get-token for authentication
  2. Upgrade CLI to 1.20.9 or 2.2.24
  3. Run a kubectl command

Expected behavior
Point releases of CLIs to not include breaking changes

Logs/output

unable to use kubectl with the EKS cluster (check 'kubectl version'): Unable to connect to the server: getting credentials: exec plugin is configured to use API version client.authentication.k8s.io/v1alpha1, plugin returned version client.authentication.k8s.io/v1beta1

Additional context
Related to aws-samples/eks-workshop#1232

@dylanlingelbach dylanlingelbach added the needs-triage This issue or PR still needs to be triaged. label Jul 30, 2021
@kdaily kdaily added investigating This issue is being investigated and/or work is in progress to resolve the issue. and removed needs-triage This issue or PR still needs to be triaged. labels Jul 30, 2021
@kdaily
Copy link
Member

kdaily commented Jul 30, 2021

Hi @dylanlingelbach,

Thanks for opening this issue. This change breaks kubectl when upgrading the AWS CLI but not running aws eks update-kubeconfig, and this was unintentional.

We recommend downgrading the AWS CLI to 1.20.8 or 2.2.23. We are going to roll back this change (pull request #6309).

We would not recommend mitigating by updating the kubeconfig or re-running the aws eks update-kubeconfig with the affected versions of the AWS CLI until we release the versions 1.20.12 and 2.2.25. We will immediately release AWS CLI v2. We are aiming to release the AWS CLI v1 on Monday, August 2, 2021.

@kdaily kdaily added bug This issue is a bug. customization Issues related to CLI customizations (located in /awscli/customizations) eks-kubeconfig and removed investigating This issue is being investigated and/or work is in progress to resolve the issue. labels Jul 30, 2021
@gabegorelick
Copy link

We would not recommend mitigating by updating the kubeconfig or re-running the aws eks update-kubeconfig with the affected versions of the AWS CLI until we release the versions 1.20.12 and 2.2.25.

What do you recommend for people that have already worked around this issue by updating their kubeconfigs to v1beta1? Will there be a way to force aws eks get-token to return v1beta1?

@kyleknap
Copy link
Contributor

kyleknap commented Jul 31, 2021

@gabegorelick

What do you recommend for people that have already worked around this issue by updating their kubeconfigs to v1beta1?

I’d say pin to the current version of the AWS CLI you are on if you do not want to update your kubeconfig again. Otherwise, when 1.20.12 and 2.2.25 are released, make sure to rerun the update-kubeconfig command after you upgrade the AWS CLI.

Will there be a way to force aws eks get-token to return v1beta1?

Not in the 1.20.12 and 2.2.25 releases. These releases are stopgaps to prevent essentially every user who has preexisting kubeconfig file that upgrades the AWS CLI from having to troubleshoot this issue and figure out that they need to either rerun their update-kubeconfig command or manually update their kubeconfig file. We are sorry that this does cause churn for people who have already handled this update, but we suspect that a majority of users have not ran into this issue yet since this is a recent change.

As a fast follow up to these releases, we are considering adding options to opt into a particular API version (e.g. by introducing --api-version flags to both the update-kubeconfig and get-token commands) so users can 1) Lock to an API version without having to worry about it changing from under them. 2) Unblock users who want to use the v1beta1 API version.

@kyleknap
Copy link
Contributor

Version 2.2.25 is now available, which fixes this issue by reverting the upgrade to the v1beta1 API version.

@joshsleeper
Copy link

hey @kyleknap I always feel guilty bumping stuff, but is there any progress or tracking issue on those --api-version opts you said would be considered?
we were in the apparently-too-quick-to-update camp across nearly 100 repos and we've been pinned to 2.2.24 since 😆

@kdaily kdaily added the needs-review This issue or pull request needs review from a core team member. label Sep 22, 2021
@bigspawn
Copy link

Hey, don't forget to rollback aws-iam-authenticator because it also has an impact on it. I use v0.5.3

@stealthycoin stealthycoin moved this to Implementation in AWS CLI Community Contributions Apr 5, 2022
@stealthycoin stealthycoin moved this from Implementation to Needs Review in AWS CLI Community Contributions Apr 5, 2022
@kdaily kdaily added ready-for-review community and removed needs-review This issue or pull request needs review from a core team member. labels Apr 6, 2022
@stevehipwell
Copy link

I've opened #6916 to request adding the --api-version flag to aws eks get-token.

@kdaily kdaily linked a pull request May 4, 2022 that will close this issue
@github-actions
Copy link

github-actions bot commented May 6, 2022

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.

@kdaily kdaily added released and removed review labels May 6, 2022
@kdaily kdaily moved this from Review to Done in AWS CLI Community Contributions May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. community customization Issues related to CLI customizations (located in /awscli/customizations) eks-kubeconfig released
Projects
Development

Successfully merging a pull request may close this issue.

7 participants