I recently needed a small lab environment to sharpen my Kubernetes skills. I setup Minikube on an Ubuntu VM running 18.04.4 LTS (bionic). This VM was created on my Windows Desktop in VirtualBox. Confused yet? Some of the commands can leave your environment insecure so do not do this in your Production Internet facing environment.
To get started, I downloaded and installed VirtualBox onto my Windows PC. I then created an Ubuntu 18.04 VM and make sure the number of vCPUs on your VM is greater than or equal to 2.
First step is to update your VM.
- sudo apt-get update
- sudo apt-get install apt-transport-https (if using 1.4 or earlier)
- sudo apt-get upgrade
Install VirtualBox on your Ubuntu VM
- sudo apt install virtualbox virtualbox-ext-pack
- wget https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64
Make it executable
- sudo chmod +x minikube-linux-amd64
Move it so its in path
- sudo mv minikube-linux-amd64 /usr/local/bin/minikube
- curl -LO https://storage.googleapis.com/kubernetes-release/release/
curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt/bin/linux/amd64/kubectl
Make it executable
- chmod +x ./kubectl
- sudo mv ./kubectl /usr/local/bin/kubectl
Check that its working properly
- kubectl version -o json
I received an error saying docker wasn’t in $PATH. You may or may not see this error.
- curl -fsSL https://get.docker.com/ | sh
- sudo minikube start –vm-driver=virtualbox
Start the Kubernetes Dashboard
- minikube dashboard
- minikube dashboard –url
If you want to view the dashboard remotely, you will need to run the following commands:
- sudo kubectl proxy –address=’0.0.0.0′ –disable-filter=true
You will get a message saying “Starting to serve on [::]:8001”
Hopefully this helps. If you get stuck or have a way to optimize this, please comment below.
Kudos to https://computingforgeeks.com/how-to-install-minikube-on-ubuntu-18-04/ for helping me get started.