Helm
EKS
token-based authentication
Kubernetes
cloud-native tools

How to use helm with token based authentication system on EKS

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

Introduction

Helm does not authenticate to Amazon EKS on its own. It uses Kubernetes client configuration in the same way kubectl does, which means the real question is how your kubeconfig obtains a valid EKS token. In practice, the cleanest approach is to let AWS generate short-lived tokens and have Helm reuse that configuration rather than trying to hard-code long-lived credentials.

Understand How Helm Authenticates to EKS

Helm talks to the Kubernetes API server through client-go behavior and kubeconfig. On EKS, authentication typically happens through a short-lived token returned by AWS.

That means:

  • Helm does not usually need a separate auth mechanism
  • if kubectl works with the same kubeconfig, Helm should work too
  • token refresh is normally handled by the kubeconfig exec integration

For most users, the correct workflow starts with aws eks update-kubeconfig.

Generate or update kubeconfig for the cluster:

bash
aws eks update-kubeconfig \
  --region us-east-1 \
  --name my-cluster

That command writes a kubeconfig entry with an exec block that fetches a fresh token when needed. Once that is in place, Helm commands work normally:

bash
helm list --all-namespaces
helm upgrade --install my-app ./chart --namespace my-app --create-namespace

This is the preferred path because token generation stays delegated to AWS tooling.

Verify the Token-Based Setup Explicitly

Before blaming Helm, confirm that Kubernetes access works through the same kubeconfig.

bash
kubectl get ns
kubectl auth can-i list pods --all-namespaces

If those commands fail, Helm will fail too. Fix cluster access first.

You can also inspect the current cluster user entry:

bash
kubectl config view --minify

Look for an exec-based user configuration rather than a hard-coded static token.

Fetch a Token Manually When Needed

In CI or debugging contexts, you may want to request a token directly.

bash
1aws eks get-token \
2  --region us-east-1 \
3  --cluster-name my-cluster \
4  --query 'status.token' \
5  --output text

That token is short-lived. You can pass it to Helm directly if necessary:

bash
1TOKEN=$(aws eks get-token --region us-east-1 --cluster-name my-cluster --query 'status.token' --output text)
2ENDPOINT=$(aws eks describe-cluster --region us-east-1 --name my-cluster --query 'cluster.endpoint' --output text)
3
4helm list \
5  --kube-apiserver "$ENDPOINT" \
6  --kube-token "$TOKEN"

This is useful in tightly controlled automation, but kubeconfig with exec is still easier to maintain.

Handle Certificate Authority Data Correctly

If you bypass kubeconfig entirely, you also need the cluster certificate authority.

bash
1aws eks describe-cluster \
2  --region us-east-1 \
3  --name my-cluster \
4  --query 'cluster.certificateAuthority.data' \
5  --output text

Without the CA configuration, direct API access may fail even if the token is valid. That is another reason kubeconfig is the safer default.

Use IAM Roles Cleanly in Automation

In CI or ephemeral build agents, prefer role-based AWS authentication rather than embedding user keys. Once the runner has AWS credentials through an IAM role, aws eks update-kubeconfig or aws eks get-token can work the same way as on a developer machine.

A typical automation flow is:

  1. assume an AWS role
  2. update kubeconfig for the target cluster
  3. run Helm commands
  4. let token expiration remain AWS-managed

This keeps authentication short-lived and auditable.

Distinguish Cluster Auth from Kubernetes RBAC

A valid EKS token only proves AWS identity. Authorization inside the cluster still depends on Kubernetes RBAC and EKS access configuration.

So, if Helm authenticates successfully but actions fail, check:

  • whether the IAM identity is mapped correctly for cluster access
  • whether the namespace permissions allow the requested action
  • whether Helm is trying to create cluster-scoped resources without sufficient rights

Authentication and authorization are separate problems.

Troubleshooting Sequence

Use this order:

  1. confirm AWS identity with aws sts get-caller-identity
  2. confirm kubectl get ns works
  3. confirm the expected kube-context is active
  4. run a simple Helm read command such as helm list
  5. only then debug chart-specific issues

This avoids wasting time on Helm when the root problem is actually AWS or kubeconfig setup.

Common Pitfalls

One common mistake is trying to give Helm a static token and expecting it to stay valid indefinitely. EKS tokens are short-lived.

Another issue is assuming Helm needs a special authentication system separate from kubectl. In most cases, Helm should simply reuse kubeconfig.

A third mistake is debugging authentication when the real failure is Kubernetes RBAC or wrong cluster context.

Summary

  • Helm on EKS normally authenticates through the same kubeconfig flow used by kubectl.
  • 'aws eks update-kubeconfig is the recommended way to make token-based access work.'
  • You can fetch tokens manually with aws eks get-token for CI or debugging.
  • Keep cluster authentication and Kubernetes authorization as separate checks.
  • If kubectl works with the target context, Helm should usually work too.

Related reading
Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

All Rights Reserved.