From cec69632edc105534ce4d24239b400479bc02fe4 Mon Sep 17 00:00:00 2001 From: Patrik Egyed Date: Wed, 31 Aug 2022 16:50:21 +0200 Subject: [PATCH] fix(EKS,Authn): fixed aws-iam-authn apiversion --- .../cluster/distribution/eks/eksprovider/workflow/amazon.go | 2 +- src/cluster/eks.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/cluster/distribution/eks/eksprovider/workflow/amazon.go b/internal/cluster/distribution/eks/eksprovider/workflow/amazon.go index d0319d6094..cbfa0b7d51 100644 --- a/internal/cluster/distribution/eks/eksprovider/workflow/amazon.go +++ b/internal/cluster/distribution/eks/eksprovider/workflow/amazon.go @@ -125,7 +125,7 @@ func generateK8sConfig(clusterName string, apiEndpoint string, certificateAuthor Name: "eks", AuthInfo: clientcmdapi.AuthInfo{ Exec: &clientcmdapi.ExecConfig{ - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: "client.authentication.k8s.io/v1beta1", Command: "aws-iam-authenticator", Args: []string{"token", "-i", clusterName}, Env: []clientcmdapi.ExecEnvVar{ diff --git a/src/cluster/eks.go b/src/cluster/eks.go index 237624479c..fada330945 100644 --- a/src/cluster/eks.go +++ b/src/cluster/eks.go @@ -728,7 +728,7 @@ func (c *EKSCluster) GetK8sUserConfig() ([]byte, error) { k8sutil.CreateAuthInfoFunc(func(clusterName string) *clientcmdapi.AuthInfo { return &clientcmdapi.AuthInfo{ Exec: &clientcmdapi.ExecConfig{ - APIVersion: "client.authentication.k8s.io/v1alpha1", + APIVersion: parsedAdminConfig.AuthInfos["eks"].Exec.APIVersion, Command: "aws-iam-authenticator", Args: []string{"token", "-i", clusterName}, },