Skip to content

Authentication with AWS broke with version 1.24 #1210

@azacchino

Description

@azacchino

What happened:

After update kubectl to 1.24 from 1.23 i get the message

Unable to connect to the server: getting credentials: decoding stdout: no kind "ExecCredential" is registered for version "client.authentication.k8s.io/v1alpha1" in scheme "pkg/client/auth/exec/exec.go:62"

when I try to perform any operation.

What you expected to happen:

ex: list pods

How to reproduce it (as minimally and precisely as possible):

.kube/config

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: DA
    server: https://XXXXXXXXXXXXXXXXXXXXX.gr7.us-east-1.eks.amazonaws.com
  name: arn:aws:eks:us-east-1:XXXXXXXXX/cluster/test_cluster
contexts:
- context:
    cluster: arn:aws:eks:us-east-1:XXXXXXXXX/cluster/test_cluster
    user: arn:aws:eks:us-east-1:XXXXXXXXX/cluster/test_cluster
  name: arn:aws:eks:us-east-1:XXXXXXXXX/cluster/test_cluster
current-context: arn:aws:eks:us-east-1:XXXXXXXXX/cluster/test_cluster
kind: Config
preferences: {}
users:
- name: arn:aws:eks:us-east-1:XXXXXXXXX/cluster/test_cluster
  user:
    exec:
      apiVersion: client.authentication.k8s.io/v1beta1
      args:
      - --region
      - us-east-1
      - eks
      - get-token
      - --cluster-name
      - test_cluster
      command: aws

Anything else we need to know?:

Environment:

  • Kubernetes client and server versions (use kubectl version): client 1.24 Server: 1.22
$ kubectl version
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-03T13:46:05Z", GoVersion:"go1.18.1", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v4.5.4
Unable to connect to the server: getting credentials: decoding stdout: no kind "ExecCredential" is registered for version "client.authentication.k8s.io/v1alpha1" in scheme "pkg/client/auth/exec/exec.go:62"
  • Cloud provider or hardware configuration: AWS EKS
  • OS (e.g: cat /etc/os-release Ubuntu 20.04.4 LTS

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions