Search code examples
amazon-web-serviceskubernetesamazon-ekspulumi

is there a way to solve " Kubeconfig user entry is using deprecated API version client.authentication.k8s.io/v1alpha1 " with pulumi


I get the following error message whenever I run a pulumi command. I verified and my kubeconfig file is apiVersion: v1 I updated client.authentication.k8s.io/v1alpha1 to client.authentication.k8s.io/v1beta1 and still have the issue, what could be the reason for this error message?

Kubeconfig user entry is using deprecated API version client.authentication.k8s.io/v1alpha1. Run 'aws eks update-kubeconfig' to update.

Solution

  • The bug report for this issue is here

    The underlying cause is that the AWS cli shipped a breaking change in a minor version release. You can see this here

    I'm assuming here you're using the pulumi-eks package in order to provision an EKS cluster greater than v1.22. The EKS package uses a resource provider to configure some EKS resources like the aws-auth config map, and this isn't the same transient kubeconfig you're referring to in ~/.kube/config

    In order to fix this, you need to do the following:

    • Ensure your aws-cli version is greater than 1.24.0 or 2.7.0
    • Ensure you've updated your pulumi-eks package in your language SDK package manager to greater than 0.40.0. This will mean also updated the provider in your existing stack.
    • Ensure you have the version of kubectl installed locally that matches your cluster version that has been provisioned