You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I run: kubectl config current-context - I get the correct cluster.
My KUBECONFIG=/home/klavs/.kube/microk8s:/home/klavs/.kube/t-boss-ca:/home/klavs/.kube/p-boa-kube-ca
but helm picks the wrong cluster. Thats VERY dangerous - when your kubectl config current-context says you're working on a different cluster (and my PS1 shows that as the active one as well)..
If I run helm - pointing to the cluster config file I want it to select like this - it works:
KUBECONFIG=/home/klavs/.kube/t-boss-ca helm ls
When I use multiple config files - and then use kubectl to set current-context - it ONLY updates the first file.. as the other files in the KUBECONFIG path - actually had invalid "current-context" - due to that context being renamed (by kubectl).. which means - that the individual files (as being used in my work-around above) - can become invalid - and in that case helm just not say the KUBECONFIG is invalid - it simply tries to connect to localhost:8080 instead..
This indicates that kubectl is merging KUBECONFIG files - and letting current-context be set by the first file in the path (and not overriden later) - whereas helm appearently does something else.
it seems helm ALWAYS chooses the FIRST configfile in KUBECONFIG - and only works on that - completely ignoring the otherfiles - and also ignoring current-context.. :(
@KlavsKlavsen The detection of the Kubernetes configuration happens via imports from packages put out by Kubernetes. With that in mind... can you share the version of Helm you're using. We need that to trace where this issue is happening in either a dependency or our use of a dependency. On a first pass in Helm v3 I didn't see an issue. Doesn't mean it's not there but more information would help me figure out what's going on.
I started looking into this issue yesterday and did find some issues with how we loading the kubeconfig. I'll work on a patch when I find the exact issue.
Activity
KlavsKlavsen commentedon Feb 6, 2020
When I use multiple config files - and then use kubectl to set current-context - it ONLY updates the first file.. as the other files in the KUBECONFIG path - actually had invalid "current-context" - due to that context being renamed (by kubectl).. which means - that the individual files (as being used in my work-around above) - can become invalid - and in that case helm just not say the KUBECONFIG is invalid - it simply tries to connect to localhost:8080 instead..
This indicates that kubectl is merging KUBECONFIG files - and letting current-context be set by the first file in the path (and not overriden later) - whereas helm appearently does something else.
KlavsKlavsen commentedon Feb 6, 2020
it seems helm ALWAYS chooses the FIRST configfile in KUBECONFIG - and only works on that - completely ignoring the otherfiles - and also ignoring current-context.. :(
mattfarina commentedon Feb 6, 2020
@KlavsKlavsen The detection of the Kubernetes configuration happens via imports from packages put out by Kubernetes. With that in mind... can you share the version of Helm you're using. We need that to trace where this issue is happening in either a dependency or our use of a dependency. On a first pass in Helm v3 I didn't see an issue. Doesn't mean it's not there but more information would help me figure out what's going on.
KlavsKlavsen commentedon Feb 7, 2020
Sorry.. its v3.0.2
adamreese commentedon Apr 22, 2020
I started looking into this issue yesterday and did find some issues with how we loading the kubeconfig. I'll work on a patch when I find the exact issue.
fix(pkg/cli): ensure correct configuration from kubeconfig file
fix(pkg/cli): ensure correct configuration from kubeconfig file
Feat/oci dependencies (#1)
fix(pkg/cli): ensure correct configuration from kubeconfig file