Canonical released MicroK8s in December 2018, and as its popularity has grown, some interesting projects using this micro Kubernetes distribution have surfaced.
To begin with a little background, Kubernetes is an open source container orchestrator that assists with deploying, upgrading and provisioning applications. Kubernetes is unique in that all the major players – Google, Microsoft, IBM, Amazon, etc. – have embraced a single framework, making it an unofficial standard.
MicroK8s is a snap package distribution of Kubernetes that sets up a cluster on your machine. Kubernetes clusters are commonly used for local development and CI/CD, and all it takes to get started is:
sudo snap install microk8s --classic
Please note that if you are on a Mac or Windows you will need a Linux VM.
MicroK8s is now being used for a wide variety of projects, enabling the development of serverless frameworks, reclaiming unused memory, AI/ML and many other interesting use cases covered in the highlights below. Please note that this is not a complete list of MicroK8s use cases, simply a few projects I am aware of.
In this use case, K8s provides a local Kubernetes cluster for integration testing using the kubeconfig file and the socket to dockerd. The addons enabled are DNS, the Docker registry and Istio.
Incentivised by this project, the
microk8s.status command was added in order to wait for the cluster to come online. As an example, you can wait up to five minutes for MicroK8s to come up with:
microk8s.status --wait-ready --timeout=300
The mission of the OpenFaas® project is to make serverless functions simple using portable Docker containers to run on any cloud, avoiding lock-in and infrastructure complexity.
With this project, the MicroK8s supplied registry add-on can be used when deploying OpenFaaS, proving a fast and easy K8s deployment.
I learned about this use case from John McCabe, whom I met at Configuration Management Camp, who “was blown away by the speed and ease with which I could get a basic lab environment up and running,” a quote from his blog post on the topic – “Deploy OpenFaaS with MicroK8s.”
The ease of deployment provides a good base for quick development of serverless frameworks, as several users have shared insight on using Kubeless solution on Kubernetes.
In one user’s test using these tools, the serverless platform was up and running in five minutes on their laptop following simple install and configuration steps.
Learn more about these projects here:
In order to run components of SUSE Cloud Application Platform (CAP), Dimitris Karakasilis was looking to use Kubernetes for local development and decided to give MicroK8s a try.
“The idea was very appealing to me because they use your machine’s resources without you having to decide on a VM size beforehand,” Karakasilis said in his blog post on this topic.
He further explained to me that his application was putting significant pressure on memory only during bootstrap, whereas with MicroK8s he was able to reclaim the unused memory after the initialization phase.
Kubeflow is the missing link between Kubernetes and AI/ML as it provides an easy, flexible and scalable way to deploy machine learning (ML) workflows on Kubernetes.
With MicroK8s, you can quickly run Kubeflow locally with all of its default core components. This use case can help with cluster set up, ensuring the machines deploying Tensorflow, for example, are aligned.T
We have seen a number of interesting use cases that include CI/CD, Serverless programming, lab setup and application development. If you have an interesting use case, please share it with us in #microk8s on the Kubernetes slack and/or issue a Pull Request against our MicroK8s In The Wild page.