4 Ways To K8S

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

MiniKube

MiniKube is usually the first Kubernetes technology found when


someone wants to begin (Kubernetes official documentation offers a
tutorial to deploy your first cluster using miniKube).

It is a very simple solution to install on your laptop and it is designed


for learning and testing. When started, it will deploy a single node
cluster (the smallest size).

Minimum requirements for the host machine:

● CPU: 2
● Memory: 2 GB
● Disk space: 20 GB

This is the easiest way to start to familiarize yourself with the


command line kubectl.

The inconvenience of this solution is this is not possible to add other


nodes, and by consequence, to discover how the architecture really
works and the full power of Kubernetes.
Cluster MiniKube architecture

PROS CONS

● Easy to install ● Too minimal


● Light
Kubeadm

Kubeadm is the “hard way” to begin with Kubernetes. With this


solution, you will be able to bootstrap a minimum viable Kubernetes
cluster that conforms to best practices. The cluster minimal size is
composed of two nodes:

● Master node
● Worker node

and you can add as many workers as you want.

But this solution is quite heavy to run on a laptop. Each node should
be deployed in a VM and the minimal requirements are:

● Memory: 2 GB
● CPU: 2 (only for the master)

If you want to deploy a cluster with several nodes you must have a
quite powerful computer. But you will be able to discover the full
potential of Kubernetes. Here is a tutorial to help you to deploy
your first Kubernetes cluster using Kubeadm.
Example of a cluster deployed with Kubeadm

Furthermore, Kubeadm lets you choose the container runtime but to


begin I recommend you to use Docker which is the one configured by
default. This is useful for beginners, who will be able to check the
containers created by Kubernetes with docker commands.
PROS CONS
● Full architecture production ● Installation more
level challenging
● Use docker containers ● Very heavy to run on a
single laptop
● Only one node master
authorized
Kind

Kind is another tool to deploy a Kubernetes cluster locally. Its


specificity is that the cluster will be deployed inside a Docker
container.

Example of the kind cluster with 1 master and 2 workers

This solution allows you to deploy all type of clusters:

● Single node
● 1 master and several workers
● Several masters and several workers

These clusters are very easy to deploy. It can be done from a very
simple YAML file:

kind: Cluster

apiVersion:
kind.x-k8s.io/v1alpha4

nodes:

- role: control-plane

- role: worker

- role: worker

view rawkind yaml cluster hosted with ❤ by GitHub


All the instructions for Kind installation and configuration are well
described in the Kind documentation.

The main inconvenience for a beginner is that as the cluster is


deployed inside a docker container, so the network management to
get access to the cluster is more difficult.
PROS CONS

● Very easy to install ● Network external access to


● Cluster very easy to deploy the cluster more
complicated
K3S

K3S is a light Kubernetes version developed by Rancher. It has been


created for production use on small servers, IoT appliances, etc. The
binary is less than 50 Mo and it can be run on a very small VM. The
minimal requirements are:

● Linux 3.10+
● 512 MB of ram per server
● 75 MB of ram per node
● 200 MB of disk space
● x86_64, ARMv7, ARM64

A light version means fewer functionalities:

● All functionalities tagged “legacy”, “alpha”, “non-default” have


been removed
● All add-ons have been removed
● Default storage is SQLlite3 instead of etcd3
● Automatic TLS management

The container runtime used by default is contained.

So K3S is a very good alternative to Kubeadm if your laptop is limited


as you can test Kubernetes on smaller VMs.
Furthermore, K3S installation and cluster deployment are very
easy. And you can create clusters with multi masters.
PROS CONS

● The very light version of ● Some functionalities are


Kubernetes missing
● Very easy to install ● Do not use Docker as the
● Cluster very easy to deploy default container runtime.

To conclude, all these technologies are a good way to begin with


Kubernetes. You just have to make a choice regarding your material
and your objectives. But if I have to recommend one of them, I will go
to Kubeadm. You may spend more time configuring your cluster but
you will have a great overview of Kubernetes possibilities.

You might also like