Table of contents
- What is MicroK8s?
- Why use MicroK8s?
- What is the cost?
- What are the goals
In this post we will see how to get started with the microk8s and deploy a simple service. We will see how to access the service from outside the cluster using ingress controller. We will also see how to use the cert-manager to get a valid ssl certificate for the service and then how to use the docker registry to store the docker images and how to use the postgres database in the microk8s cluster. We will use tye to build the application and deploy it in the microk8s cluster.
What is MicroK8s?
MicroK8s is the easiest and fastest way to get Kubernetes up and running. Experiment with the latest upstream features and toggle services on and off. Seamlessly move your work from dev to production. It is Minimal and CNCF-certified distribution. it has Batteries included and sensible defaults. Microk8s is built by the Kubernetes team at Canonical. It is a single package of kubernetes that installs on 42 flavours of Linux. It works on all major Linux distributions, Windows, and macOS.
Why use MicroK8s?
After moving away from docker swarm. I was looking for simple and easy to use kubernetes distribution. After trying out few options I have settled on microk8s as best option for the replacement of docker swarm. It is very easy to setup and managing it very easy and its perfect for my personal use. It provides all the features I need in the form of addons and removes most of the complexity in managing the kubernetes cluster. It is perfect for personal use. If you a developer who wants to use the kubernetes cluster without the complexities of managing the cluster this is the best option. It is also perfect for the small teams who want to use the kubernetes cluster for their development and testing.
What is the cost?
In this post I will create a single node cluster which will cost around 15€ or $. I'm going to use hetzner cloud and you can use the referral link https://hetzner.cloud/?ref=ENhA4rCZ5JUM and get 20€ for free to try it out.
What are the goals
The goals are as follows
- Setup and connect to the kubernetes cluster using kubectl
- Setup reverse proxy to redirect traffic to containers (nginx) and lets encrypt for ssl.
- Deploy registry and postgres with storage
- Deploy a .Net application which connects to the postgres database
Part 1. Setup MicroK8s With Ubuntu
Part 2. Setup Nginx and cert-manager in MicroK8s
Part 3. Deploy docker registry and postgres database in MicroK8s
Part 4. Create and deploy .Net application in MicroK8s
you can find most of the code and yaml files used in the series here
This series is created with developers in mind. I wanted to show how easy it is to use k8s without the complexities. I think after docker swarm this is the best option for the my personal use. Give it a try and let me know how do you like it. I will be happy to hear your feedback. If you have any questions or suggestions please leave a comment below. I will be happy to answer them.