This message was deleted.
# rancher-desktop
a
This message was deleted.
g
To follow on this , it seems this may be more of an issue for dev-containers and Microsoft's copy-kube-config script as instead of obtaining kubeconfig from $KUBECONFIG where this can merge one or more config files to present possible contexts, it seems to be taking the ~/.kube/config only
Despite this, the confusing part is that when $KUBECONFIG is being used to provide possible contexts and the context selected is one other than rancher desktop, Kubernetes Contexts in the menubar app does not display the possible contexts. I believe this is a bug in RD.
I have resolved the issue in the dev container by placing additional configurations in a config-files folder within my ~/.kube folder. Thus, they are also copied into the container. I am then sourcing a script that sets the default context and iterates over the additional config-files to append them to the $KUBECONFIG so they are merged to be able to select one or more contexts.
The last issue remains a Rancher Desktop issue in that on my system if I set a context other than "rancher-desktop", the context in "Kubernetes Contexts" for rancher desktop remains "rancher desktop". I believe this a bug.
p
Hi! Yes, we should be showing all contexts (but I'm not sure if we're dealing with multiple files in
$KUBECONFIG
correctly); and we should only be clobbering
current-context
if it's not set, but again that probably doesn't work well with multiple config files.
g
@proud-jewelry-46860 Thank you for your reply. This can and should be handled by Rancher Desktop in a way that is understood for one or more configurations. The current state of the UI cannot reflect this. While an issue has been filed for this, there needs to be a predictable way of working with RD with multiple kubernetes configurations. That means thinking this out with some best practices with $KUBECONFIG and not making assumptions about the environment RD is being installed on. Reliably configuring clusters for local development is an essential part of the user experience. It is common to need a handle on one or more kubernetes clusters, whether that be those are local or remote.
p
Yeah, we need improvements in this area — could you file a feature request issue on GitHub (using this link) so we don't lose it? We may eventually file a thing to duplicate it to, but it's always easier to err on filing more things and dupe later.
g
@proud-jewelry-46860 Sure