Getting started with Kubernetes using Rancher Desktop
3 min readOct 10, 2023
- Download the latest release of Rancher Desktop from the following link :
- For Apple Silicon download macOS aarch64
- Wait for the VMs to start :
- Click on Images and make sure you are able to pull the images :
- Make sure the network status is Online in the general tab :
- Download and install Visual Studio Code from :
- You can now run your kubectl commands in the Terminal window of Visual Studio Code.
NOTE: Make sure that you start Visual Studio Code after Rancher Desktop is completely started.
Troubleshooting :
Error 1:
$ kubectl get po
I1010 06:29:32.779055 41592 versioner.go:58] invalid configuration: no configuration has been provided
E1010 06:29:32.991361 41592 memcache.go:265] couldn’t get current server API group list: Get “http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
….
The connection to the server localhost:8080 was refused — did you specify the right host or port?
Error 2:
$ kubectl get po
W1010 06:27:06.666574 41306 loader.go:223] Config not found: /etc/rancher/k3s/k3s.yaml
I1010 06:27:06.666779 41306 versioner.go:58] invalid configuration: no configuration has been provided
E1010 06:27:06.827769 41306 memcache.go:265] couldn’t get current server API group list: Get “http://localhost:8080/api?timeout=32s": dial tcp 127.0.0.1:8080: connect: connection refused
…
The connection to the server localhost:8080 was refused — did you specify the right host or port?
If you are using Rancher Desktop as a test machine then a quick fix for such issues would be to delete all workloads and configuration.
Rancher Desktop -> Troubleshooting -> Reset Kubernetes