Photo by CJ Dayrit on Unsplash

MicroK8s: Unleashing power of Kubernetes in a Snap

If you are a Kubernetes enthusiast but have not yet experimented with MicroK8s, then this post is for you.

MicroK8s is CNCF certified upstream Kubernetes deployment that can run on your laptop, workstation or on edge devices. It runs all the Kubernetes services natively and unlike Minikube, doesn’t require a separate virtual machine to run, thus making it a far more lighter alternative for offline development and/or prototyping.

Microk8s is available for Linux, Windows and MacOS. I will use Ubuntu 18.04 as reference in this post (well that, and the fact that Ubuntu is the only OS that I happen to carry in my laptop 😉 )

Install Microk8s in a jiffy

MicroK8s is a snap and can be installed using snapd. In fact snapd makes it very straightforward to install MicroK8s. Several Linux distros including Ubuntu, comes pre-installed with snapd and here’s how to install MicroK8s:

sudo snap install microk8s --classic

In case, you are interested in a specific upstream release, just select your preferred channel during installation

sudo snap install microk8s --classic --channel=1.18/stable

To learn about the available channels, use the following command:

sudo snap info microk8s

During the snap installation process, a group named microk8s is created and users in that group get access to microk8s commands. Thus, a good way to get started would be to add your user to this group.

sudo usermod -aG microk8s <username>

If you are not using Kubernetes all the time, do not forget to stick to a start/stop cycle

microk8s start
microk8s stop

Unleash the power of Kubernetes

At this point, you should be able to use kubectl imperative and declarative commands that you have always known like the back of your hands.

Figure-1: Some sample imperative commands

A word for lazy typists

In case you are a lazy typist like myself, you can save a few key strokes by creating an alias for microk8s.kubectl (quite a mouthful, eh! 😄 )

alias k='microk8s.kubectl'

You can easily place this command inside ~/.bashrc file in order to make the change permanent and then use it happily thereafter:

k run nginx --image nginx --restart Never


MicroK8s comes with a formidable arsenal of add-on services like dashboard, metrics-server, prometheus, fluentd, helm, istio, knative, kubeflow, etc. The list is quite long and deserves a lot of experiments on your part.

So what are you waiting for? Install MicroK8s and start working with your very own local Kubernetes.

Arik's father | Solution Architect | Amateur Photographer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

After Learning Python, What Are The Next Steps to Become An AI Developer?

How to solve the Hacker Rank Staircase problem?

Progressive Web App: Here’s Everything You Need To Know About PWA

Feature: Ramming Enemy

GameDevHQ | Day 9

Structure your Flask Project

How to choose a programming language efficiently?

Best iOS 14 widget apps 2020 for iPhone 12 — The Useful Tech

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adrin Mukherjee

Adrin Mukherjee

Arik's father | Solution Architect | Amateur Photographer

More from Medium

Get shell access to pods & nodes in Kubernetes using kubectl

K8s || On-Prem

Set up Kubernetes Cluster using Kind in 2 mins

Kubernetes: DaemonSet