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.
CodePudding user response:
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-cliversion is greater than1.24.0or2.7.0 - Ensure you've updated your
pulumi-ekspackage in your language SDK package manager to greater than0.40.0. This will mean also updated the provider in your existing stack. - Ensure you have the version of
kubectlinstalled locally that matches your cluster version that has been provisioned
CodePudding user response:
...I verified and my kubeconfig file is apiVersion: v1
There's no v1 yet, the correct version should be apiVersion: client.authentication.k8s.io/v1beta1. But this is not enough, you also need awscli version >= 2.7.1 on your system where pulumi runs. After you updated the awscli version, you then remove the cluster settings (eg. cluster,user,context) from the config file and run aws eks update-kubeconfig --name <cluster> for the cli to update the config for you.
