Tuesday, September 4, 2018

Getting started with K8S with Minikube on Linux

Why Minikube?

As mentioned in the previous blog, setting up K8S is a complex task and those new to Linux, it might be a bit of challenge. And so we have Minikube to the rescue. The good thing about Minikube is that it requires very few steps and runs on multiple Operating Systems. For those curious there are tons of ways of installing K8S as mentioned here.

Minikube sets up a Virtual Machine (VM). The VM is very similar to those from Cloudera, HortonWorks and MapR which are used for Big Data. These VMs have the different softwares already installed and configured. These make them easy for those who want to get started with the respective softwares and also for demos. But, these VM are not good for using in production.

Minikube is easy to use, but there are a few disadvantages of it. It runs on a single node, so we won't be able to try some of the features like response to a node failure, some of the advanced scheduling. But, still Minikube is nice to get started with K8S.

Installing Minikube on Ubuntu

I tried out the instructions as mentioned here and they work as-is for Ubuntu 18.04, so I thought of not repeating the same in this blog. Go ahead and follow the instructions for completing the setup of Minikube. Here are a few pointers though.

  • When we run the 'minikube start' for the the first time it has to download the VM and so is a bit slow, from then on it's fast.
  • In the VirtualBox UI, the minikube VM will be shown as below in running state. Note that the VM image has been downloaded configured and started.
  • By default not much memory and CPU are allocated to the VM. So, first we need to shutdown the VM as shown below. The status of the VM should be changed to powered off.

  • Now go to the settings of this particular VM and change the memory and the CPU settings. Make sure not to cross the green line as per the VirtualBox recommendations. After making the resource changes, start the minikube again. Notice that the VM will not be download this time.


Now that we looked at how to setup to Minikube on Ubuntu, I am aware not everyone has Ubuntu, so we will explore installing Minikube on Windows also.
Also, we will slowly explore the different features of K8S in the upcoming blogs. So, keep looking.

No comments:

Post a Comment