Installing Rancher Desktop
Setting Up Rancher Desktop with WSL2 on Windows
Prerequisites
Rancher Desktop requires Windows Subsystem for Linux (WSL) on Windows; this will automatically be installed as part of the Rancher Desktop setup. Manually downloading a distribution is not necessary.
Note: You need WSL2 to use Rancher Desktop properly.
Step 1: Install WSL2
To install WSL2, follow these steps:
- Open PowerShell as Administrator Right-click on the Start menu and select Windows PowerShell (Admin).
- Run the Commands to Install WSL2 Execute the commands mentioned in the Microsoft WSL installation guide. Follow each step carefully.
Download and Install Linux Kernel Update During Step 4 of the WSL installation process, you'll be prompted to download the Linux kernel update. Follow the provided link to download and install the update.
Step 2: Install Rancher Desktop
-
Visit the Rancher Desktop Official Website Navigate to the Rancher Desktop website and download the installer for Windows.
-
Install Rancher Desktop Run the installer and follow the on-screen instructions.
-
Launch Rancher Desktop After installation, double-click the Rancher Desktop icon on your desktop to open the application.
Step 3: Install Ubuntu from Microsoft Store
-
Open Microsoft Store Search for "Ubuntu" in the Microsoft Store.
-
Download and Install Ubuntu Install Ubuntu from the store. After installation, launch Ubuntu and set up your username and password.
Step 4: Configure Rancher Desktop
-
Open Rancher Desktop Preferences Right-click on the Rancher Desktop icon in the taskbar and select Preferences.
-
Configure WSL
- Go to WSL settings.
- Select Ubuntu as the distribution.
-
Configure Container Engine
- Go to Container Engine settings.
- Select dockerd (moby).
-
Configure Kubernetes
- Go to Kubernetes settings.
- Select the latest version available.
-
Hit Apply After making these changes, click Apply to save and apply the changes.
ISSUE: Kubernetes Version Not Showing Up
If you face issues with the Kubernetes version not showing up, follow these steps:
- Open PowerShell as Administrator
Run the following command to install
kubectl: curl.exe -LO "https://dl.k8s.io/release/v1.31.0/bin/windows/amd64/kubectl.exe" - Restart Rancher Desktop Quit Rancher Desktop from the taskbar and then relaunch it. The Kubernetes versions should now be visible.
[Optional]
Install Docker in Ubuntu
- Open Ubuntu Terminal Launch the Ubuntu terminal.
- Install Docker Run the following command to install Docker: sudo apt install docker.io
- Verify Docker Installation Run the following command to check if Docker was installed successfully: docker version
ISSUE: Permission Denied Error with Docker
If you encounter a "permission denied" error when running the docker version command without sudo privileges, follow these steps to fix it:
- Add Docker Group and User Run the following commands one by one: sudo addgroup --system docker sudo adduser $USER docker newgrp docker
- Set Correct Permissions Run these commands to set the correct permissions: udo chown root:docker /var/run/docker.sock sudo chmod g+w /var/run/docker.sock
- Verify Fix
Run the
docker versioncommand again. The permission denied error should be resolved.