https://rancher.com/ logo
Title
l

lemon-jelly-91576

12/01/2022, 7:48 PM
I installed Rancher Desktop a few days ago and it was working until this morning when things broke down. when I run
kubectl version
I’m getting this error:
invalid configuration: no configuration has been provided
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: <http://version.Info|version.Info>{Major:"1", Minor:"25", GitVersion:"v1.25.4", GitCommit:"872a965c6c6526caa949f0c6ac028ef7aff3fb78", GitTreeState:"clean", BuildDate:"2022-11-09T13:36:36Z", GoVersion:"go1.19.3", Compiler:"gc", Platform:"darwin/amd64"}
Kustomize Version: v4.5.7
The connection to the server localhost:8080 was refused - did you specify the right host or port?
Something in the configuration seems to have become corrupted somehow. How can I reset the ~/.kube/config or re-establish a new configuration?
1
👀 1
c

creamy-pencil-82913

12/01/2022, 7:49 PM
localhost:8080
is what you get if you don’t have a kubeconfig, Did you forget to set $KUBECONFIG to point at a valid file?
l

lemon-jelly-91576

12/01/2022, 7:52 PM
I have KUBECONFIG set in in the ~/.zshrc
export KUBECONFIG="/Users/MYUSER/.kube/config"
c

creamy-pencil-82913

12/01/2022, 7:53 PM
is that a valid file?
l

lemon-jelly-91576

12/01/2022, 7:53 PM
kubeconfig has this, where XX are replacing the actual secret data
apiVersion: v1
kind: Config
clusters:
  - name: rancher-desktop
    cluster:
      server: <https://127.0.0.1:6443>
      certificate-authority-data: XX
      insecure-skip-tls-verify: false
users:
  - name: rancher-desktop
    user:
      client-certificate-data: XX
      client-key-data: XX
contexts:
  - name: rancher-desktop
    context:
      cluster: rancher-desktop
      name: rancher-desktop
      user: rancher-desktop
preferences: {}
current-context: ""
I ended up uninstall the k8s client, docker and docker compose, removed the bad config file. then reinstalled RD and now it seems to work again. 🤷
q

quick-air-43978

01/23/2023, 5:11 AM
Pretty destructive 🙂. I had it conflicting with minikube so I just uninstalled minikube, backed up and removed the config from ~/.kube and did a "factory reset" on Rancher Desktop.