UPDATE
This is slightly different than the posted comment asking if the linked question resolves my issue. The problem is that helm in the container is trying to connect to localhost
which is not correct. It should be reading my information from the KUBECONFIG
environment variable being passed in. Unless helm is trying to spin up a container and connect to that...which would definitely give a connection refused because that won't work.
ORIGINAL
We use a helm container in our CI environment to execute our helm commands and it works swimmingly. I am trying to replicate that success running helm from a container locally and not having much luck. I'm 99% sure it's a config issue, but I haven't been able to find any thing on the Internet specific to this situation. Here's the snippet docker command from my script. I've been testing with ls
as the argument:
docker run \
-v $(pwd):/apps \
-v "${HOME}/.kube:/root/.kube" \
-v "${HOME}/.helm:/root/.helm" \
-e KUBECONFIG=${HOME}/foo/kubeconfig \
-it \
-w "$(pwd)" \
-ti \
docker-dev.foo.com/bar/bat/helm helm "$@"
And here's the error I'm getting:
Error: Get http://localhost:8080/api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller: dial tcp 127.0.0.1:8080: connect: connection refused
If I do a helm ls
locally (I.e., outside the container), everything works just fine which is why I believe this is a config issue.