3

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.
Kaizendae
  • 853
  • 11
  • 24
  • did you try to `delete` it and `create` it with a `yaml` config file that respect the `apiVersion: v1` ? – Aladin Jun 02 '22 at 08:59

1 Answers1

7

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
jaxxstorm
  • 12,422
  • 5
  • 57
  • 67
  • Great, am using pulumi with typescript, I upgraded @pulumi/eks to 0.40.0 and @pulumi/aws to 5.6.0, aws cli to 2.7.5. and everything worked. thank you – Kaizendae Jun 02 '22 at 14:06
  • I upgraded @pulumi/aws to 5.7.4, but was instantly greeted with the error "unable to discover AWS AccessKeyID and/or SecretAccessKey", though I've all credentials in ~/.aws/credentials. – samox Jun 09 '22 at 09:56
  • @samox thats a different error, please open a new question – jaxxstorm Jun 09 '22 at 13:49