Your submission was sent successfully! Close

You have successfully unsubscribed! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates about Ubuntu and upcoming events where you can meet our team.Close

MicroK8s in the Wild

This article is more than 4 years old.


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.

Spring Cloud Kubernetes

This project, introduced in this Pull Request, uses CircleCI for CI/CD, facilitating the running of Spring Cloud and Spring Boot applications inside Kubernetes.

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

OpenFaaS on MicroK8s

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.”

Serverless Solutions with MicroK8s and Kubeless

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:

SUSE Cloud Application Platform (CAP) on Microk8s

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

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

Summary

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.

kubernetes logo

What is Kubernetes?

Kubernetes, or K8s for short, is an open source platform pioneered by Google, which started as a simple container orchestration tool but has grown into a platform for deploying, monitoring and managing apps and services across clouds.

Learn more about Kubernetes ›

Newsletter signup

Get the latest Ubuntu news and updates in your inbox.

By submitting this form, I confirm that I have read and agree to Canonical's Privacy Policy.

Related posts

How should a great K8s distro feel? Try the new Canonical Kubernetes, now in beta

Try the new Canonical Kubernetes beta, our new distribution that combines ZeroOps for small clusters and intelligent automation for larger production...

Canonical Kubernetes 1.29 is now generally available

A new upstream Kubernetes release, 1.29, is generally available, with significant new features and bugfixes. Canonical closely follows upstream development,...

How to use Ubuntu in GKE on nodes and in containers

Google Kubernetes Engine (GKE) traces its roots back to Google’s development of Borg in 2004, a Google internal system managing clusters and applications. In...