This installation process will guide you through running and accessing Kubernetes Cluster on a Linux Mint. You will be using
apt-get, Docker, Minikube, VirtualBox and
Minikube is a lightweight Kubernetes implementation that deploys a Virtual Machine locally, and runs a basic cluster with one master and one minion together running on this unique VM.
Download and install minikube to
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \ && sudo install minikube-linux-amd64 /usr/local/bin/minikube
Verify that your system has virtualization support enabled:
egrep -q 'vmx|svm' /proc/cpuinfo && echo yes || echo no
If the above command outputs “no”:
- If you are running within a VM, your hypervisor does not allow nested virtualization. You will need to use the None (bare-metal) driver
- If you are running on a physical machine, ensure that your BIOS has hardware virtualization enabled
Let’s get through the installation process for VirtualBox
VirtualBox is an open-source hypervisor application that helps you create and run guest operating systems ("virtual machines") such as Linux and Windows under a host operating system. VirtualBox can be installed on host operating systems, including Linux, Windows, Solaris, OS X, and OpenSolaris.
NOTE: VirtualBox 6.0 does not support 32-bit hosts. So, to install VirtualBox on 32-bit Linux Mint machine, you would need to go for the earlier version which is VirtualBox 5.2.
You shouldd import the public key of Oracle VirtualBox repository to your system. Open up a terminal and run next command:
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
Add the VirtualBox repository using the following command.
### Linux Mint 19 ### echo "deb [arch=amd64] http://download.virtualbox.org/virtualbox/debian bionic contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list ### Linux Mint 18 ### echo "deb http://download.virtualbox.org/virtualbox/debian xenial contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
Update the repository index database.
sudo apt-get update
Install the VirtualBox using the apt command.
sudo apt-get install -y virtualbox-6.0
Starting a cluster using a virtualbox driver
minikube start --vm-driver=virtualbox
To make virtualbox the default driver
minikube config set vm-driver virtualbox
Once started, you can use any regular Kubernetes command to interact with your minikube cluster. For example, you can see the pod states by running:
kubectl get po -A
Increasing memory allocation
minikube only allocates 2GB of RAM by default, which is only enough for trivial deployments. For larger deployments, increase the memory allocation using the
--memory flag, or make the setting persistent using:
minikube config set memory 4096