Skip to content

Commit 9e71830

Browse files
authored
Merge pull request #3740 from dkoshkin/dkoshkin/fix-eks-user-kubeconfig
fix: use v1beta1 version in EKS user kubeconfig
2 parents d52c10c + ba79cb3 commit 9e71830

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/cloud/services/eks/config.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,11 @@ func (s *Service) createUserKubeconfigSecret(ctx context.Context, cluster *eks.C
187187
return fmt.Errorf("creating base kubeconfig: %w", err)
188188
}
189189

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

0 commit comments

Comments
 (0)