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.
Error: Kubernetes cluster unreachable: Get "https://10.0.0.1/version":
getting credentials: exec: executable aws not foundCommon 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.
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
- Read the kubeconfig
execblock to see which helper it calls. - Install that CLI (aws, gke-gcloud-auth-plugin) on the runner.
- Re-mint short-lived credentials just before the Helm step in long jobs.
How to prevent it
- Verify
kubectl cluster-infosucceeds before any Helm command in CI. - Install required cloud auth plugins in the runner image.
- Generate fresh credentials immediately before deploying.