question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Helm Release deployment to EKS cluster requires AWS CLI

See original GitHub issue

What happened?

While deploying helm Release to EKS cluster created with pulumi classic package, deployment fails with error:

getting credentials: exec plugin is configured to use API version client.authentication.k8s.io/v1beta1, plugin returned version client.authentication.k8s.io/v1alpha1

Due to this docs only aws-iam-authenticator is required in order to authenticate to cluster. However, with pare installation of aws-iam-authenticator the Release is not deployed onto cluster. Temporarily we’ve fixed the problem installing the whole AWS CLI.

Steps to reproduce

  • Create EKS cluster with AWS classic package
  • build kubeconfig based on EKS data
  • build provider from kubeconfig
  • try to deploy any helm release onto EKS cluster using created provider

Expected Behavior

Helm Release is deployed without need to install AWS CLI

Actual Behavior

AWS CLI is required

Versions used

No response

Additional context

No response

Contributing

Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you’ve opened one already).

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
gurchikcommented, Sep 16, 2022

TL;DR: Install the latest version of aws-iam-authenticator from the the Github page.

The problem lies in aws-iam-authenticator not being updated to support the later Kubernetes clients. This provider uses the client k8s.io/client-go v0.24.2 dependency which dropped support for client.authentication.k8s.io/v1alpha1. When an exec plugin like aws eks get-token or aws-iam-authenticator is executed, it returns a response like

{
  "kind":"ExecCredential",
  "apiVersion":"client.authentication.k8s.io/v1alpha1",
  ...other fields here...
}

The apiVersion needs to be supported by both the client, which is client-go in this case, and that was changed to only support v1beta1 now. See https://github.com/kubernetes/client-go/issues/1095

If your AWS CLI is updated to the latest versions, aws eks get-token will work with this provider because AWS updated this tool to return an output with the proper apiVersion. But as of writing this comment, the installation instructions for aws-iam-authenticator from AWS’s documentation still gives a link to a very old version (2021-07-05). If you really want to use aws-iam-authenticator, all you have to do is install the latest version from the Github page instead and everything will work. I tested and confirmed this with version 0.5.9.

0reactions
logicbombcommented, Nov 6, 2022

Another possible issue is to ensure that you are running the latest version of the aws cli. I was running terraform on a fresh copy of Ubuntu, that had aws cli v1 installed, upgradeing to v2 did the trick.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Helm with Amazon EKS
This topic helps you install and run the Helm binaries so that you can install and manage charts using the Helm CLI on...
Read more >
Using Helm With EKS
Learn how to use Helm for Amazon EKS, the AWS solution for Kubernetes. ... and deploying applications to your EKS cluster will usually...
Read more >
Deploying Helm charts to Amazon EKS
Amazon's Elastic Kubernetes Service (EKS) · Setting up · Create an EKS cluster · Adding an external load-balancer · Deploy the Helm Chart...
Read more >
Vault Installation to Amazon Elastic Kubernetes Service via ...
This tutorial requires an AWS account, AWS command-line interface (CLI), Amazon EKS CLI, Kubernetes CLI and the Helm CLI. First, create an AWS...
Read more >
circleci/aws-eks@2.2.0
Creates an EKS cluster and required resources (e.g. VPC) using the eksctl tool. ... orbs: aws-cli: circleci/aws-cli@2.0 helm: circleci/helm@1.2 kubernetes: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found