K3D — A development launchpad

While K3s is designed to provide a highly available production cluster for Edge devices, K3d is conceived for development purposes and spins up a multi-node K3s cluster with ease.

K3s by Rancher is the lightweight Linux distro designed for situations where compute resources may be limited or where a smaller footprint of a Kubernetes solution is needed, such as IoT and Edge devices. K3d is slightly different as it is the lightweight wrapper to run multi-node K3s clusters for development purposes.

In a previous blog-post, we discussed deeply how Rancher made K3s well suitable for certain types of workloads.

K3s is an entirely self-contained binary; it includes ContainerD, tools, and Kubectl. All-in-all is less than 100 Mb.

Multi-Node Install with K3d

It’s easy to question how K3s can be a production distribution of Kubernetes? How can such a small cluster be better than the alternatives, such as miniKube, microkates, or other distros that are not fit for production? Well, K3s is different as it is designed for multi-node HA operation in resource-constrained environments like IoT and the Edge, but it’s just as much at home in the DataCenter as it is in a fighter jet or wind farm. K3d comes to the picture to simplify the deployment of a K3s cluster in a Highly-Available mode, mainly for development purposes.

A tarball is provided (250MB) for those who are looking to run K3s/K3d in a fully air-gap situation.

K3s can be installed with ease as a Highly Available cluster using k3d.

Install K3d by grabbing the Install Script and piping it to “bash”:

wget -q -O -https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash

Let’s fire our first HA cluster:

k3d cluster create --servers 3 --image rancher/k3s:v1.19.3-k3s2

K3d did the magic by creating a fully available K3s cluster of 3 running servers in addition to a dedicated load balancer node. Let’s list the active clusters and check the available/running nodes:

k3d cluster listkubectl get nodes

Cleanup time!

k3d cluster delete

Before concluding this article, I want to share with you the latest release of K0S, cooked by Mirantis. It has the same principle as K3S/K3D but adds additional confusion as everyone is playing with digits and names from K0S, K3S, K3D, K8S without adding value.

Rancher K3s kept growing…

Is a DevOps & Cloud enthusiast with 12 plus years of experience. He’s continuously immersing himself in the latest technologies trends & projects.