Skip to content
Latchkey

Helm "Kubernetes cluster unreachable" - Fix Helm Auth in CI

Helm uses your kubeconfig to talk to the cluster, and it could not connect or authenticate. The kubeconfig is missing, points at the wrong endpoint, or its credentials are invalid - so Helm fails before touching any release.

What this error means

A Helm command fails with Error: Kubernetes cluster unreachable: followed by a connection or auth error. It happens on the first cluster contact, before any chart work.

helm output
Error: Kubernetes cluster unreachable: Get "https://10.0.0.1/version":
getting credentials: exec: executable aws not found

Common causes

Missing or wrong kubeconfig

No KUBECONFIG was exported, or it points at a stale endpoint, so Helm has no valid cluster to reach.

Expired credentials or missing auth plugin

The token expired, or the kubeconfig’s exec auth plugin (aws/gcloud) is not installed on the runner, so authentication fails.

How to fix it

Generate and verify cluster access first

Materialize the kubeconfig and confirm kubectl can reach the cluster before invoking Helm.

Terminal
aws eks update-kubeconfig --name my-cluster --region us-east-1
kubectl cluster-info   # must succeed before helm
helm upgrade --install <release> ./chart -n <ns>

Install the auth plugin Helm needs

  1. Read the kubeconfig exec block to see which helper it calls.
  2. Install that CLI (aws, gke-gcloud-auth-plugin) on the runner.
  3. Re-mint short-lived credentials just before the Helm step in long jobs.

How to prevent it

  • Verify kubectl cluster-info succeeds before any Helm command in CI.
  • Install required cloud auth plugins in the runner image.
  • Generate fresh credentials immediately before deploying.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →