helmfile "context deadline exceeded" in CI
A helm operation launched by helmfile exceeded its timeout: either the API server was unreachable from the runner, or --wait waited past the deadline for resources to become ready. The message names the deadline, not the deeper cause.
What this error means
helmfile apply or sync fails with "Error: context deadline exceeded" or "Kubernetes cluster unreachable: ... context deadline exceeded" while contacting the cluster.
Error: context deadline exceeded
in ./helmfile.yaml: command "helm" exited with non-zero statusCommon causes
The API server is unreachable from the runner
A missing or wrong KUBECONFIG, a private endpoint, or a network hop that the runner cannot reach makes every request time out.
A release with --wait never became ready
helm waited for pods or hooks that stayed unready past the timeout, so the operation hit its deadline.
How to fix it
Confirm cluster connectivity and KUBECONFIG
- Verify KUBECONFIG points at a reachable context from the runner.
- Run
kubectl get nsto confirm the API server responds. - Check that the runner has a network route to a private endpoint.
export KUBECONFIG=$PWD/kubeconfig
kubectl cluster-info
helmfile applyRaise the timeout for slow rollouts
Give helm more time to wait for readiness when the deadline, not connectivity, is the issue.
helmfile apply --wait --timeout 600How to prevent it
- Export a valid KUBECONFIG before any helmfile command.
- Set realistic
--timeoutvalues for releases that use--wait. - Ensure runners can route to the cluster API endpoint.