How to Install Kubernetes with Minikube on Ubuntu 18.04 LTS

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 give you how to install minikube on Ubuntu 18.04, first let’s start with an introduction before diving to the installation steps.

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

Step 1: Update system

firstly you can run the following commands to update all system packages to the latest release:

Step 2: Install KVM or VirtualBox Hypervisor

In this tutorial i will use Virtualbox as hypervisor, so you can use the following command in your terminal to install it :

How to Install Kubernetes with Minikube on Ubuntu 18.04 LTS

Step 3: Download minikube

You need to download the minikube binary using the commands bellow

Now we can check minikube version with this command

If Curl is not installed on your system, you can install it through the following command as root:

Step 4: Install kubectl on Ubuntu 18.04

We need kubectl which is a command line tool used to deploy and manage applications on Kubernetes cluster

Add Kubernetes apt repository:

Update apt index and install kubectl

Check if Kubectl is installed with the command below:

Step 5: 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

Step 6: Minikube Basic operations

To check cluster status, run:

To View Config, use:

To check running nodes:

To Access minikube VM using ssh:

To stop a running local kubernetes cluster, run:

To delete a local kubernetes cluster, use:

6. Access Kubernetes Dashboard

By default, Kubernetes comes with web dashboard that can be used to manage our cluster, we can list all the minikube addons with the following command:

To open directly on our default browser :

To get the URL of the dashboard

7. Conclusion

In this post, i have explained the installation of the Kubernetes cluster on Ubuntu 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 🙂

4850cookie-checkHow to Install Kubernetes with Minikube on Ubuntu 18.04 LTS

Related Posts

Leave a Comment