Last active
May 2, 2025 10:41
-
-
Save Zheaoli/335bba0ad0e49a214c61cbaaa1b20306 to your computer and use it in GitHub Desktop.
Revisions
-
Zheaoli revised this gist
May 7, 2022 . 2 changed files with 20 additions and 16 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,14 @@ Please update your awscli to 2.6.3 ~~In v1.24.0, `kubectl` will report the following error when relying on the kubeconfig generated by aws-cli~~ ~~> error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"~~ ~~The reason is that Kubernetes deprecated `client.authentication.k8s.io/v1alpha1"` from the `exec` plugin in [PR108616](https://github.com/kubernetes/kubernetes/pull/108616)~~ ~~And the aws-cli update [PR6476](https://github.com/aws/aws-cli/pull/6476/files) has not been merged. There are two solutions~~ ~~1. Roll back kubectl to any version less than v1.24.0~~ ~~2. Take MacOS + HomeBrew as an example:~~ ~~1. Modify "client.authentication.k8s.io/v1alpha1" in your kubeconfig to "client.authentication.k8s.io/v1beta1"~~ ~~2. Put "client.authentication.k8s.io/ in `/usr/local/Cellar/awscli/{awscliVersion}/libexec/lib/python3.9/site-packages/awscli/customizations/eks/get_token.py` v1alpha1" changed to "client.authentication.k8s.io/v1beta1"~~ This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,14 @@ 升级 awscli 到 2.6.3 ~~在 v1.24.0 中,`kubectl` 在依赖 aws-cli 生成的 kubeconfig 的时候会报错如下~~ ~~> error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"~~ ~~原因是,Kubernetes 在 [PR108616](https://github.com/kubernetes/kubernetes/pull/108616) 中将 `client.authentication.k8s.io/v1alpha1"` 从 `exec` plugin 中废弃~~ ~~而 aws-cli 的更新 [PR6476](https://github.com/aws/aws-cli/pull/6476/files) 还没有合并。解决方法有两个~~ ~~1. 将 kubectl 回退至任意小于 v1.24.0 的版本~~ ~~2. 以 MacOS + HomeBrew 为例:~~ ~~1. 修改你 kubeconfig 中的 "client.authentication.k8s.io/v1alpha1" 为 "client.authentication.k8s.io/v1beta1"~~ ~~2. 将 `/usr/local/Cellar/awscli/{awscliVersion}/libexec/lib/python3.9/site-packages/awscli/customizations/eks/get_token.py` 中的 "client.authentication.k8s.io/v1alpha1" 修改为 "client.authentication.k8s.io/v1beta1"~~ -
Zheaoli revised this gist
May 5, 2022 . No changes.There are no files selected for viewing
-
Zheaoli renamed this gist
May 5, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
Zheaoli created this gist
May 5, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ In v1.24.0, `kubectl` will report the following error when relying on the kubeconfig generated by aws-cli > error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1" The reason is that Kubernetes deprecated `client.authentication.k8s.io/v1alpha1"` from the `exec` plugin in [PR108616](https://github.com/kubernetes/kubernetes/pull/108616) And the aws-cli update [PR6476](https://github.com/aws/aws-cli/pull/6476/files) has not been merged. There are two solutions 1. Roll back kubectl to any version less than v1.24.0 2. Take MacOS + HomeBrew as an example: 1. Modify "client.authentication.k8s.io/v1alpha1" in your kubeconfig to "client.authentication.k8s.io/v1beta1" 2. Put "client.authentication.k8s.io/ in `/usr/local/Cellar/awscli/{awscliVersion}/libexec/lib/python3.9/site-packages/awscli/customizations/eks/get_token.py` v1alpha1" changed to "client.authentication.k8s.io/v1beta1" This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ 在 v1.24.0 中,`kubectl` 在依赖 aws-cli 生成的 kubeconfig 的时候会报错如下 > error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1" 原因是,Kubernetes 在 [PR108616](https://github.com/kubernetes/kubernetes/pull/108616) 中将 `client.authentication.k8s.io/v1alpha1"` 从 `exec` plugin 中废弃 而 aws-cli 的更新 [PR6476](https://github.com/aws/aws-cli/pull/6476/files) 还没有合并。解决方法有两个 1. 将 kubectl 回退至任意小于 v1.24.0 的版本 2. 以 MacOS + HomeBrew 为例: 1. 修改你 kubeconfig 中的 "client.authentication.k8s.io/v1alpha1" 为 "client.authentication.k8s.io/v1beta1" 2. 将 `/usr/local/Cellar/awscli/{awscliVersion}/libexec/lib/python3.9/site-packages/awscli/customizations/eks/get_token.py` 中的 "client.authentication.k8s.io/v1alpha1" 修改为 "client.authentication.k8s.io/v1beta1"