Steps to Install and Run Rancher Desktop on Windows 11 with VPN

Puneeth Prakash
4 min readJan 3, 2024

--

NOTE:

Check the detailed prerequisites from Rancher Deskop’s official website before you begin the installation:

https://docs.rancherdesktop.io/getting-started/installation/

Pre-Requisites:

  • Go to Task Manager → Performance → CPU and confirm that Virtualization is Enabled. If it is disabled then you may have to enable it in BIOS.
  • Go to Control Panel → Programs → “Turn Windows features on or off” and confirm that the following components are enabled:
  • Hyper-V
  • Virtual Machine Platform
  • Windows Subsystem for Linux

If it is not enabled then enable them and restart your computer.

Step 1:

Download Rancher Desktop from:

https://github.com/rancher-sandbox/rancher-desktop/releases

OR

https://rancherdesktop.io/

Step 2:

Install Rancher

Step 3:

Download the wsl-vpnkit latest release, say “wsl-vpnkit.tar.gz” from:

Step 4:

Open PowerShell and run the following command:

wsl --import wsl-vpnkit --version 2 $env:USERPROFILE\wsl-vpnkit <path_to>/wsl-vpnkit.tar.gz

If an empty prompt (no output) is returned then, the command is run successfully.

If you see the following message, then your WSL 2 needs an update:

“ WSL 2 requires an update to its kernel component. For information please visit https://aka.ms/wsl2kernel"

Go to the URL mentioned in the error → “https://aka.ms/wsl2kernel" and download and install the WSL 2 update and then rerun the above command:

Restart your computer if prompted.

Step 5: (with VPN disconnected)

Start Rancher Desktop

Step 6:

Open PowerShell and run the following commands:

wsl --set-default-version 2

wsl --setdefault rancher-desktop

Step 7:

Run wsl-vpnkit using the below command:

wsl.exe -d wsl-vpnkit --cd /app wsl-vpnkit

wsl-vpnkit will run in the foreground. So do not close PowerShell window.

NOTE: You must run this command whenever you restart your computer.

Step 8:

Open a new tab in PowerShell and run the following command:

wsl -l -v

Example:

Expected output:

PS C:\Users\Puneeth> wsl -l -v
NAME STATE VERSION
* wsl-vpnkit Running 2
rancher-desktop-data Stopped 2
rancher-desktop Running 2

rancher-desktop should be the default distro and should be running.

Step 9:

Run a few sample kubectl and docker commands in PowerShell to confirm everything is working fine:

docker version
kubectl get nodes
kubectl get po --all-namespaces
kubectl get ns

Step 10:

Now connect to VPN.

Run a few sample kubectl and docker commands and confirm everything is working fine.

Troubleshooting:

If you have any issues with running Rancher Desktop while on VPN, to start Rancher Desktop in the following sequence:

  • Disconnect VPN
  • Start WSL in Powershell using the following command:
wsl.exe -d wsl-vpnkit --cd /app wsl-vpnkit
  • Do not close Powershell.
  • Start RancherDesktop
  • Now connect to VPN
  • Open a new tab in PowerShell and check if kubectl and docker commands are working fine.

--

--

Puneeth Prakash
Puneeth Prakash

Written by Puneeth Prakash

I work as a Subject Matter Expert in FMW at Oracle. This blogging space is to share my learning experiences. Views expressed here are solely my own.

No responses yet