How to Install Kubernetes (k8s) using Minikube Linux, Mac and Windows

by Ismail.EL
0 comment

1. What is Kubernetes

kubernetes (commonly stylized as k8s) is an open-source system for automating deployment, scaling, and management of containerized applications.

In this post i will shows you how to install Minikube, a tool that runs a single-node Kubernetes cluster in a virtual machine on your personal computer.

Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a Virtual Machine (VM) on your laptop for users looking to try out Kubernetes or develop with it day-to-day.

2. Adience

This article is prepared for anyone who want to create cluster using kubernetes.

3. Prerequisites

  • An SSH key pair on your local Linux/Mac OS/BSD machine.
  • Three servers running Ubuntu 18.04 with at least 2GB RAM and 2 vCPUs each.

4. Kubernetes features supported by Minikube:

  • DNS
  • NodePorts
  • ConfigMaps and Secrets
  • Dashboards

As of this writing, Minikube does not yet support Cloud Provider specific features such as:

  • LoadBalancers
  • PersistentVolumes
  • Ingress

Hypervisor choice for Minikube:

Minikube supports both VirtualBox and KVM hypervisors.

5. Minikube Installation – Linux

Step 1: Before begin

To check if virtualization is supported on Linux, run the following command and verify that the output is non-empty:

  • Linux

To check if virtualization is supported on Linux, run the following command and verify that the output is non-empty:

Step 2: Install kubectl on Linux

Step 3: Install a Hypervisor

If you do not already have a hypervisor installed, install one of these now:

KVM, which also uses QEMU
VirtualBox

Step 4: Install minikube

We can download a stand-alone binary and use that using the commands bellow

Now we can check minikube version with this command

6. Minikube Installation – MacOS

Step 1: Before begin

To check if virtualization is supported on macOS, run the following command on your terminal.

If you see VMX in the output (should be colored), the VT-x feature is enabled in your machine.

Step 2: Install kubectl on McOs

To install kubectl in MacOS you can use same steps applied in this Step 3: Install kubectl on Linux

Step 3: Install a Hypervisor on MacOS

If you do not already have a hypervisor installed, install one of these now:

HyperKit
VirtualBox
VMware Fusion

Step 4: Install minikube on MacOS

The easiest way to install Minikube on macOS is using Homebrew:

You can also install it on macOS by downloading a stand-alone binary:

Here’s an easy way to add the Minikube executable to your path:

7. Minikube Installation – Windows

Step 1: Before begin

To check if virtualization is supported on Windows 8 and above, run the following command on your Windows terminal or command prompt.

If you see the following output, virtualization is supported on Windows.

If you see the following output, your system already has a Hypervisor installed and you can skip the next “Step 2“.

Step 2: Install kubectl on Windows

  1. Download the latest release v1.16.0 from this link.
  2. Add the binary in to your PATH.
  3. Test to ensure the version of kubectl is the same as downloaded:

Step 3: Install a Hypervisor on Windows

If you do not already have a hypervisor installed, install one of these now:
Hyper-V
VirtualBox

Note: Hyper-V can run on three versions of Windows 10: Windows 10 Enterprise, Windows 10 Professional, and Windows 10 Education.

Step 4: Install minikube on Windows

To install Minikube manually on Windows using Windows Installer, download minikube-installer.exe and execute the installer.

You can use The Package Manager for Windows to istall Minikube like that:

The easiest way to install Minikube on Windows is using Chocolatey (run as an administrator):

8. Starting minikube

Now that components are installed, we can start minikube. VM image in virtualbox will be downloaded and configured for Kubernetes single node cluster.null minikube start

For Linux and Mac:

For Windows:

8. Conclusion

In this post, i have explained the installation of the Kubernetes cluster in Linux, Mac and Windows OS using minikube.
If you have any questions or feedback, feel free to leave a comment.
As always, if you found this post useful, then click like and share it 🙂

5310cookie-checkHow to Install Kubernetes (k8s) using Minikube Linux, Mac and Windows

Related Posts

Leave a Comment