We already covered the basics of Kubernetes in a previous tutorial. As a single-node Kubernetes cluster, Minikube is the best way to run Kubernetes on your laptop because it can be squarely placed inside a virtual machine.
The official website of Kubernetes provides complete instructions on how to get started with Minikube. In the following steps we have recreated these instructions using actual screenshots.
Step 1. Install a Hypervisor
First, you will need to install a hypervisor such as KVM, VMware Fusion, Hyper-V or VirtualBox. Depending on whether you have Windows, Mac or Linux, select your recommended hypervisor as shown below. We are going to use VirtualBox as it is compatible with all three.
Once the download finishes, you can set up VirtualBox on your computer.
Next, you must allocate the correct folders to run the VirtualBox application. By default, it will install itself in the Oracle folder.
After installing the hypervisor, you can immediately start creating virtual machines to help you with Kubernetes projects. Give the virtual machine a name such as “Kubernetes project,” and select the correct operating system and version.
You will have to create a virtual hard disk with a 50 GB recommended size. While it might seem like a major overhead, there is an advantage in that you can create multiple VirtualBox machines inside the machine.
Finally, you must allocate the memory (RAM) which should be at least 2048 MB. Your Kubernetes virtual machine is now ready.
Step 2 – Install Kubectl
After the hypervisor, you will have to install kubectl, available on the Kubernetes website. Kubectl is a very important command tool because it single-handedly runs all the instructions which the Master node serves to worker nodes. Again, you can make your selection for either Linux, Mac or Windows.
For Windows users it is better to create a folder called “Kubernetes” in C: drive and download the .exe application right there. The download should start automatically and won’t take very long.
Next, you will have to define a path for the kubectl application so that it can be located by the terminal emulators. In Windows 10, right-click “This PC” and go to “Properties.” After that, click “Advanced system settings” and “environment variables.”
Here you must create a new path for the folder in which the kubectl file has been placed. Click “New” and simply rename the environment variable after the folder name – in this case
C:\Kubernetes. Click OK and close all the windows.
To check if kubectl was installed properly, go to the command prompt. This is only a demo, but while working with real Kubernetes projects in Windows, it is better to use an alternative command terminal such as Cygwin. Mac and Linux users can use their regular terminals without a problem.
kubectl once and hit Enter. You should now see all the Kubectl commands, which will be useful.
Step 3 – Install Minikube
Finally, you have to install Minikube. For Windows users, the easiest option is downloading an application called “Minikube-Windows-AMD64.”
Note: AMD64 refers to 64-bit processor. It will work with Intel systems just as easily.
To choose the above software version, you will have to select it from Minikube’s GitHub page as shown below.
Again, install it in the same Kubernetes folder as shown earlier. You will have to first rename the file as “Minikube.exe.”
Finally, you must check if Minikube was installed properly. If you followed all the above steps, you can now run Minikube on your favorite command terminal. Simply type
minikube and hit Enter. Additionally, follow the steps in this extensive Oracle tutorial on how to run VirtualBox from a command line.
You should now see all the basic commands of Minikube in your window. Additionally, you can practice using many of the tutorials on the Kubernetes official website. Of course, it will take time and patience!
Once you learn Kubernetes, you can easily orchestrate containers and run your own servers and data centers. You can even work on Internet of Things projects using Raspberry Pi or Arduino.
Did you face any problems installing Minikube? Let us know in the comments.
Our latest tutorials delivered straight to your inbox