helm: helm failed to resolve on osx when cgo_enabled false
helm stopped working with osx /etc/resolver/* files. It was very useful in case of corporate VPN dns resolving.
https://github.com/golang/go/issues/12524
> helm list --all
Error: Kubernetes cluster unreachable: Get "https://<k8s_server>:8443/k8s/clusters/c-pkq2n/version": dial tcp: lookup <k8s_server> on <external_dns_instead_of_corporate>:53: no such host
Output of helm version:
version.BuildInfo{Version:"v3.8.2", GitCommit:"6e3701edea09e5d55a8ca2aae03a68917630e91b", GitTreeState:"clean", GoVersion:"go1.18.1"}
Output of kubectl version:
Client Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.5", GitCommit:"c285e781331a3785a7f436042c65c5641ce8a9e9", GitTreeState:"clean", BuildDate:"2022-03-16T15:51:05Z", GoVersion:"go1.17.8", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.8", GitCommit:"5575935422cc1cf5169dfc8847cb587aa47bac5a", GitTreeState:"clean", BuildDate:"2021-06-16T12:53:07Z", GoVersion:"go1.15.13", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (1.23) and server (1.20) exceeds the supported minor version skew of +/-1
Also I’ve found that os x binaries on https://github.com/helm/helm/releases are built with build-cross make target (as far I can guess) which differ from helm install binary.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 2
- Comments: 17 (7 by maintainers)
@joejulian the downstream helm brew formula has never explicitly specified
CGO_ENABLED, and only used our defaultmake build.The problem was actually caused by us forcing
CGO_ENABLED=0in commit https://github.com/helm/helm/commit/3490f1e7b6d76709b7ea195370f7db463735f9e2 (released in helm 3.8.2).To fix this, we either need to expose a method of setting
CGO_ENABLED=1in ourmake buildor revertCGO_ENABLEDto be1by default (as it was for helm 3.8.1 and before).Note that the build for
kubectlautomatically detects that a build is happening on darwin and enables CGO, we should do the same.As i mentioned in: https://github.com/helm/helm/issues/10874#issuecomment-1101741929 I have the same issue in my Arch Linux environment, reverting back to 3.8.1 solved my issue with connecting to my private AKS with twingate(VPN).