Skip to main content

Microk8s: the lightest production Kubernetes you’ll ever need

For a long time, I wanted to fill the huge expanse between docker/docker swarm and a full fledged Kubernetes distribution like EKS or GKE. I found Microk8s to fill that void perfectly.

Allow me to explain. I want to use Kubernetes for almost all of my projects. But I can’t stand the big bill I get at the end of every month. Some of my projects need just 1 VM, but I still want to run them on Kubernetes. Not to mention the overhead of running clusters and upgrading Kubernetes versions. I’m not saying Microk8s is the magic pill which will solve all your problems, but it definitely addresses many of them.

Microk8s is for developers #

We developers are a bunch of half-arsed ops persons. I for one don’t know how to troubleshoot if a cluster installed using kubeadm is not booting, even after getting my CKA(grin). Microk8s, for comparison is a breeze to install and setup. Don’t want a feature? Simply turn it off. Want to try out a cool new beta add-on? Toggle it on! Oh, did I mention that upgrading Kubernetes is as easy as installing the latest stable version?

Microk8s is production ready #

Want to run Microk8s in HA mode? There’s a recipe for that. It even comes with a bunch of community add-ons, in addition to the core add-ons. Heck, you can define your own add-ons(NOTE to self, must create a ShapeBlock add-on someday).

Microk8s is NOT for purists #

I hear many arguments like:

  1. If your cluster goes down, you are your own support.
  2. Microk8s is not real Kubernetes. It uses Dqlite instead of etcd as the datastore.
  3. How to do clustering? I.e. add and remove nodes automatically in a cluster. Every silver lining has a cloud. For me, switching to Microk8s has been liberating and I believe you can also get similar results if you’re switching from a managed Kubernetes provider. This is not to advocate everyone to throw away managed Kubernetes and switch over. Understand the features and limitations of each tooling and take your own educated decision on this one.

The how #

I’ll be writing the next couple of posts on how to deploy microk8s the “infra-as-code” way and how to do common things in microk8s, like multiple nodes, persistent storage and ingresses.

Want the source code used in this post?

Share your email and I'll send an invitation to the Github repo which contains the source code used in this post.

    By clicking subscribe you agree to share your email address with me to receive emails. Use the unsubscribe link in those emails to opt out at any time.