helm upgrade with specified namespace is trying to install to the "kube-system" namespace

8/9/2019

I'm trying to install my kubernetes deployment by helm, but after passing helm upgrade with specified namespace, helm is installing it to the default kube-system namespace.

My version of helm is:

Client: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.9.1", GitCommit:"20adb27c7c5868466912eebdf6664e7390ebe710", GitTreeState:"clean"}

The command:

helm upgrade application-catalog . -f /tmp/values-nonprod.eyaml.dec.yaml --install --set deployment.version=0.3.64 --namespace playground --wait --timeout 120 --debug

The error what I got:

Error: pods is forbidden: User "guest" cannot list pods in the namespace "kube-system"
-- rusna
kubernetes
kubernetes-helm

1 Answer

8/9/2019

First of all, to install a chart you have to use helm install not helm upgrade.

In your case when you can't use helm do deploy app, you could use template feature of helm:

helm template application-catalog -f /tmp/values-nonprod.eyaml.dec.yaml --set deployment.version=0.3.64 | kubectl -n playground apply -f -
-- FL3SH
Source: StackOverflow