helm / helm

The Kubernetes Package Manager
https://helm.sh
Apache License 2.0
26.5k stars 7.02k forks source link

Helm install in --dry-run still attempts kubernetes connection #13144

Open jaitaiwan opened 3 weeks ago

jaitaiwan commented 3 weeks ago

According to the helm install help text:

If --dry-run is set with no option being specified ... it will not attempt cluster connections.

Running the following command: helm install --dry-run --output yaml test ./mychart

Should allow me to generate yaml of the install without contacting the kubernetes API. Instead I receive the following error: Error: INSTALLATION FAILED: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp [::1]:8080: connect: connection refused

It has the same issue with helm install --dry-run=client --output yaml test ./mychart

Output of helm version: version.BuildInfo{Version:"v3.15.1", GitCommit:"e211f2aa62992bd72586b395de50979e31231829", GitTreeState:"clean", GoVersion:"go1.22.3"}

Output of kubectl version: Irrelevant

Cloud Provider/Platform (AKS, GKE, Minikube etc.): Irrelevant

mattfarina commented 2 weeks ago

I was able to reproduce this bug.