helm / helm

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

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

Open jaitaiwan opened 9 months ago

jaitaiwan commented 9 months 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 9 months ago

I was able to reproduce this bug.

olegans1972 commented 5 months ago

I have the same bug

olegpodguyko@MacBook-Air-Oleg stt % helm install --dry-run  stt ./helm
Error: INSTALLATION FAILED: Kubernetes cluster unreachable: Get "http://localhost:8080/version": dial tcp [::1]:8080: connect: connection refused
olegpodguyko@MacBook-Air-Oleg stt % helm version
version.BuildInfo{Version:"v3.16.3", GitCommit:"cfd07493f46efc9debd9cc1b02a0961186df7fdf", GitTreeState:"dirty", GoVersion:"go1.23.3"}
olegpodguyko@MacBook-Air-Oleg stt %