Skip to content

Commit

Permalink
Merge pull request #3763 from k8s-infra-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…3740-to-release-1.5

[release-1.5] fix: use v1beta1 version in EKS user kubeconfig
  • Loading branch information
k8s-ci-robot committed Oct 31, 2022
2 parents 49ac163 + 7d79e43 commit 299d2b7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/cloud/services/eks/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ func (s *Service) createUserKubeconfigSecret(ctx context.Context, cluster *eks.C
return fmt.Errorf("creating base kubeconfig: %w", err)
}

execConfig := &api.ExecConfig{APIVersion: "client.authentication.k8s.io/v1alpha1"}
// Version v1alpha1 was removed in Kubernetes v1.23.
// Version v1 was released in Kubernetes v1.23.
// Version v1beta1 was selected as it has the widest range of support
// This should be changed to v1 once EKS no longer supports Kubernetes <v1.23
execConfig := &api.ExecConfig{APIVersion: "client.authentication.k8s.io/v1beta1"}
switch s.scope.TokenMethod() {
case ekscontrolplanev1.EKSTokenMethodIAMAuthenticator:
execConfig.Command = "aws-iam-authenticator"
Expand Down

0 comments on commit 299d2b7

Please sign in to comment.