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

[Bug] eksctl utils write-config breaks in kubectl 1.24 when aws-iam-authenticator absent #5257

Closed
jglick opened this issue May 13, 2022 · 1 comment · Fixed by #5287 or #5288
Closed
Labels

Comments

@jglick
Copy link

jglick commented May 13, 2022

See #5240 (comment) & aws/aws-cli#6920 for context. As recommended in https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html I am not running aws-iam-authenticator. Evidently https://github.com/weaveworks/eksctl/blob/637d454ef59305b4af6633ff939674eff1f408c2/pkg/utils/kubeconfig/kubeconfig.go#L161-L166 should be extended to https://github.com/weaveworks/eksctl/blob/637d454ef59305b4af6633ff939674eff1f408c2/pkg/utils/kubeconfig/kubeconfig.go#L185 https://github.com/weaveworks/eksctl/blob/637d454ef59305b4af6633ff939674eff1f408c2/pkg/utils/kubeconfig/kubeconfig.go#L32-L36

What were you trying to accomplish?

Use eksctl utils write-config (or actually just use the config generated by eksctl create cluster).

What happened?

Config is written, but then kubectl operations fail with

error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"

How to reproduce it?

Versions

$ eksctl info
eksctl version: 0.97.0
kubectl version: v4.5.4
OS: linux
$ which aws-iam-authenticator
$ aws --version
aws-cli/2.6.4 Python/3.9.11 Linux/5.13.0-40-generic exe/x86_64.ubuntu.21 prompt/off
$ kubectl version --client
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.0", GitCommit:"4ce5a8954017644c5420bae81d72b09b735c21f0", GitTreeState:"clean", BuildDate:"2022-05-04T02:28:17Z", GoVersion:"go1.18.1", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.4
@gohmc
Copy link

gohmc commented May 17, 2022

Change from client.authentication.k8s.io/v1alpha1 to client.authentication.k8s.io/v1beta1 should work. More details here.

torredil added a commit to torredil/eksctl that referenced this issue May 18, 2022
…henticator absent eksctl-io#5257

Signed-off-by: Eddie Torres <torredil@amazon.com>
cPu1 added a commit that referenced this issue May 24, 2022
…on-working configurations (#5288)

* Detect kubectl version during kubeconfig generation and avoid known non-working configurations (#5257)

* Update kubectl check to use JSON output instead of short output

* Update pkg/utils/kubeconfig/kubeconfig.go with PR suggestion

Co-authored-by: Chetan Patwal <cPu1@users.noreply.github.com>

Co-authored-by: Chetan Patwal <cPu1@users.noreply.github.com>
copybara-service bot pushed a commit to GoogleCloudPlatform/PerfKitBenchmarker that referenced this issue Jul 19, 2022
copybara-service bot pushed a commit to GoogleCloudPlatform/PerfKitBenchmarker that referenced this issue Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants