31
loading...
This website collects cookies to deliver better user experience
the official minikube site has documentation for installing on Windows, Linux, and macOS, but not on Ubuntu with WSL 2 backend.
compared to the macOS or Linux, the installation process on Ubuntu with WSL 2 backend is not a trivial task.
You can install WSL 2 by following this article Install WSL on Windows 10
You can install Ubuntu on WSL 2 by following this article Ubuntu on WSL 2 Is Generally Available
All you need is Docker (or similarly compatible) container or a Virtual Machine environment, and Kubernetes is a single command away: minikube start
. You can install Docker Desktop for Windows by following this article Docker Desktop WSL 2 backend
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
sudo dpkg -i minikube_latest_amd64.deb
sudo minikube config set vm-driver none
These changes will take effect upon a minikube delete and then a minikube start
$USER
to the .minikube
directory.sudo chown -R $USER $HOME/.minikube
sudo chmod -R u+wrx $HOME/.minikube
sudo apt-get install -y conntrack
sudo minikube profile list
. Delete all existing profiles.sudo minikube delete --purge=true --all=true
minikube
using the following command without sudo
privileges:minikube start --driver=docker --delete-on-failure
--driver=none
should not be used in Windows.😄 minikube v1.20.0 on Ubuntu 18.04
✨ Using the docker driver based on user configuration
👍 Starting control plane node minikube in cluster minikube
🚜 Pulling base image ...
💾 Downloading Kubernetes v1.20.2 preload ...
> preloaded-images-k8s-v10-v1...: 491.71 MiB / 491.71 MiB 100.00% 7.71 MiB
> gcr.io/k8s-minikube/kicbase...: 358.09 MiB / 358.10 MiB 100.00% 5.30 MiB
> gcr.io/k8s-minikube/kicbase...: 358.10 MiB / 358.10 MiB 100.00% 5.90 MiB
🔥 Creating docker container (CPUs=2, Memory=2200MB) ...
🐳 Preparing Kubernetes v1.20.2 on Docker 20.10.6 ...
▪ Generating certificates and keys ...
▪ Booting up control plane ...
▪ Configuring RBAC rules ...
🔎 Verifying Kubernetes components...
▪ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟 Enabled addons: storage-provisioner, default-storageclass
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
sudo minikube start
:
Exiting due to GUEST_MISSING_CONNTRACK: Sorry, Kubernetes 1.20.2 requires conntrack to be installed in root's path
sudo apt-get install -y conntrack
sudo minikube start --driver=docker
:
Exiting due to DRV_AS_ROOT: The "docker" driver should not be used with root privileges.
minikube start --driver=docker
without sudo
privilege.minikube start --driver=docker
:
Exiting due to HOST_HOME_PERMISSION: Failed to save config: open /home/dennislwm/.minikube/profiles/minikube/config.json: permission denied
sudo chown -R $USER $HOME/.minikube; chmod -R u+wrx $HOME/.minikube
sudo minikube start --driver=docker
:
Exiting due to GUEST_DRIVER_MISMATCH: The existing "minikube" cluster was created using the "none" driver, which is incompatible with requested "docker" driver.
sudo minikube profile list
. The following command should resolve the above issue:sudo minikube delete --purge=true --all=true
31