TNS
VOXPOP
Favorite Social Media Timesink
When you take a break from work, where are you going?
Instagram/Facebook
0%
Discord/Slack
0%
LinkedIn
0%
Video clips on TikTok/YouTube
0%
X, Bluesky, Mastodon et al...
0%
Web surfing
0%
I do not get distracted by petty amusements
0%
Cloud Services / Kubernetes

Install Minikube on Ubuntu Linux for Easy Kubernetes Development

While you won't be deploying apps and services at scale, Minikube nonetheless is a great way to start learning how to work with Kubernetes.
Feb 4th, 2023 6:00am by
Featued image for: Install Minikube on Ubuntu Linux for Easy Kubernetes Development

I’ve long said that Kubernetes is far from user-friendly. Not only is deploying pods and services to a cluster a challenge, but simply getting the cluster up and running can be a real nightmare.

Fortunately, there are a few applications available that make deploying a Kubernetes-friendly environment relatively simple. I’ve already talked about deploying a Kubernetes cluster via MicroK8s and this time around we’ll do something similar with a tool called Minikube. The purpose of Minikube is to create a local Kubernetes cluster for development purposes. This means you won’t be deploying apps and services at scale with this platform. Instead, Minikube is a great way to start learning how to work with Kubernetes.

You can deploy Minikube on Linux, macOS, and Windows. Given Linux is my operating system of choice, I’ll demonstrate on Ubuntu Linux. With this tutorial, you should be able to get a Kubernetes environment up and running in less than five minutes.

Ready? Let’s get busy.

Requirements

To make this work, you’ll need a running instance of a Ubuntu-based Linux distribution and a user with sudo privileges. The minimum requirements of Minikube are:

  • Two CPUs or more
  • 2GB of free memory
  • 20GB of free disk space

With those requirements met, it’s time to install.

Installing Docker CE

Unlike regular Kubernetes, Minikube depends on Docker. So, before Minikube will function, you must first install the Docker runtime. Here’s how.

The first thing to do (after you’ve logged into your Ubuntu instance) is to add the official Docker GPG key with the command:


Next, add the Docker repository:


Install the necessary dependencies with the following command:


Install the latest version of the Docker engine with these two commands:


Finally, add your user to the docker group with the command:


Log out and log back in for the changes to take effect.

Docker is now installed.

Installing Minikube

Download the latest Minikube binary with the command:


Copy the file to the /usr/local/bin directory with the command:


Give the Minikube executable the proper permissions with:


Next, we need to install the kubectl command line utility. Download the binary executable file with:


Give the new file the executable permission with:


Move the file into /usr/local/bin with the command:


You can now start Minikube with the command:


After the command completes, you can verify it’s running properly with the command:


The output will look like the following:

Using kubectl via Minikube

With Minikube ready, you can now start to play around with Kubernetes. For example, you can check on the status of the cluster with the command:


The output of the command will look something like this:


To further debug and diagnose cluster problems, use ‘kubectl cluster-info dump

Check the status of the nodes with the command:

Installing Add-ons

Minkube also includes a number of add-ons to extend the feature set, such as ingress, metrics server, and dashboard. To find out what add-ons are available, issue the command:


Let’s say you want to add the Dashboard add-on, which can be achieved with the command:


The output of the command will include the address used to access your new Dashboard. Of course, the caveat to this is that it’ll be a local address, such as 127.0.0.1, and you can’t access it from outside the machine hosting Minikube. Because of this, your best bet is to install and use Minikube on a Linux distribution that has a desktop, otherwise, the Dashboard won’t be accessible.

Other than that, you can start developing or learning the ropes of Kubernetes with the help of Minikube. You certainly won’t be using Minikube in a production environment, but as a development environment, it’s hard to be this simple to use the Kubernetes platform.

Group Created with Sketch.
TNS owner Insight Partners is an investor in: Docker.
THE NEW STACK UPDATE A newsletter digest of the week’s most important stories & analyses.