rancher-sandbox / rancher-desktop

Container Management and Kubernetes on the Desktop
https://rancherdesktop.io
Apache License 2.0
5.93k stars 280 forks source link

steve process fails if KUBECONFIG defined as list of configuration files #2858

Open jmgrady opened 2 years ago

jmgrady commented 2 years ago

Actual Behavior

I work with multiple k8s clusters. My preferred method for managing them (based on our installation process) is to have a separate kubectl configuration file for each and have KUBECONFIG defined as a list of files in my .profile.

When I start rancher-desktop it starts fine but when I try to display the Dashboard, the window is blank.

Steps to Reproduce

  1. Set the KUBECONFIG environment variable to a list of files, e.g.:

    export KUBECONFIG=~/.kube/config:~/.kube/k3s/config:~/.kube/nuc2/config:~/.kube/qa/config:~/.kube/aws-prod/config:~/.kube/aws-rke/config

    (with a valid configuration in each of the config files)

  2. Start rancher-desktop
  3. Open the Dashboard

Result

Dashboard window is displayed but its contents are blank.

Open the logs for steve and the following error is displayed:

2022-09-03T13:24:31.910Z: stderr: time="2022-09-03T09:24:31-04:00" level=fatal msg="stat /home/grady/.kube/config:/home/grady/.kube/k3s/config:/home/grady/.kube/nuc2/config:/home/grady/.kube/qa/config:/home/grady/.kube/aws-prod/config:/home/grady/.kube/aws-rke/config: no such file or directory"

2022-09-03T13:24:31.914Z: child process exited with code 1

Expected Behavior

Rancher UI is displayed in the Dashboard window.

Additional Information

For a workaround, change the Exec line of /usr/share/applications/rancher-desktop.desktop to:

Exec=env KUBECONFIG=${HOME}/.kube/config rancher-desktop

Rancher Desktop Version

1.5.1

Rancher Desktop K8s Version

1.24.4

Which container engine are you using?

containerd (nerdctl)

What operating system are you using?

Ubuntu

Operating System / Build Version

Ubuntu 22.04

What CPU architecture are you using?

x64

Linux only: what package format did you use to install Rancher Desktop?

deb

Windows User Only

No response

himslm01 commented 1 year ago

Same issue with v1.6.1 on Suse Linux Tumbleweed with multiple files listed in KUBECONFIG