DYK… Minikube is a great way to learn Kubernetes?

What is Minikube?

Minikube is a lightweight Kubernetes distribution. It is ALL-IN-ONE cluster installation where both control plane and worker run on a local system.

Minikube creates a VM or a Docker container on your host and deploys a simple cluster containing one or a few nodes. This cluster allows you to demo Kubernetes operations without the need to install and configure Kubernetes from scratch, which is more time- and resource consuming.

Minikube is available for Linux, macOS, and Windows systems. The Minikube CLI provides basic bootstrapping operations, such as start, stop, status, and delete. Its main focus is to make it easy to learn and develop for Kubernetes.

Here is how Minikube’s Architecture looks like:

Key Features

  • Supports the latest Kubernetes release (+6 previous minor versions)
  • Cross-platform (Linux, macOS, Windows)
  • Deploy as a VM, a container, or on bare-metal
  • Multiple container runtimes (CRI-O, containerd, docker) supported
  • Direct API endpoint for blazing fast image load and build
  • Advanced features such as LoadBalancer, Filesystem mounts, FeatureGates, and network policies
  • Addons for easily installed Kubernetes applications

Supports common CI environments

How does it work?

The node needs to have a Docker container runtime pre-installed (or another container or Virtual Machine manager such as Libvirt with KVM hypervisor or VirtualBox).

Additionally you will need 2 or more CPUs, 2GB of free memory, 20GB of free disk space and an Internet connection.

You can use Minikube for testing, development or learning locally on any modern hardware. After setting up a cluster you will need a way to interact with the said cluster, create resources, operate payloads and so on. Here is where kubectl comes into play.

Kubectl is a standard command-line tool for Kubernetes. Kubectl gets automatically configured to access the kubernetes cluster control plane inside minikube when the minikube start command is executed.

However if you don’t have kubectl installed locally, minikube already includes kubectl which can be used like this:

minikube kubectl -- < kubectl commands >

Minikube runs both master and work processes. One of the Master processes known as K8s API server is the main entry point into the K8s cluster. In order to do anything with Kubernetes (configuring, creating components, etc.) your requests have to go through the API server.

It is possible to communicate with API server through different clients: a UI (dashboard), a REST API (kubernetes api), or a command line tool (CLI) which is kubectl.

Kubectl is the most powerful of all the three clients because it allows you to do anything you want. Once kubectl submits commands to the API server (to create or delete components, etc.), the work processes on the minikube node will execute the commands.

Kubectl can be used to interact with any type of kubernetes cluster setup, it works in a cloud cluster or hybrid cluster as well.

Besides all the basic features, minikube also provides support for Network Policies, Load Balancers and Persistent Volumes making it suitable to learn all advanced features and aspects of Kubernetes.

Follow the link below for the official tutorial: https://minikube.sigs.k8s.io/docs/start/