MicroK8s: Setup Ingress Nginx Controller and Cert Manager on Kubernetes Single Node Cluster

One of the advantages of MicroK8s is that it allows users to use almost all the tools and libraries available for common Kubernetes clusters, including the popular Nginx Ingress.

MicroK8s: Setup Ingress Nginx  Controller and Cert Manager on Kubernetes Single Node Cluster
MicroK8s x Nginx

Introduction

MicroK8s is a lightweight, easy-to-install Kubernetes distribution designed for developers, IoT devices, and edge computing environments. One of the advantages of MicroK8s is that it allows users to use almost all the tools and libraries available for common Kubernetes clusters, including the popular Nginx Ingress. This article will guide you through the process of installing Nginx on a MicroK8s cluster.

Installing Ingress Nginx to MicroK8s

Prerequisites

Before you begin, ensure that you have a running MicroK8s cluster. If you haven't installed MicroK8s yet, you can follow this guide:

How to setup low-cost, zero-ops, full-featured Kubernetes Cluster in a single VM using MicroK8s
Microk8s is a lightweight, easy-to-install Kubernetes distribution that provides a fully-featured cluster on a single VM. It has gained popularity in recent years for its simplicity and ease of use, especially when compared to other similar Kubernetes options such as k3s and minikube.

To install Nginx Ingress on MicroK8s, you first need to enable three addons: dns, cert-manager, and ingress. These addons provide essential functionality for managing domain name resolution, handling SSL certificates, and routing external traffic to your cluster.

~$ microk8s enable cert-manager ingress dns

SSL Issuer

Once you have completed all the prerequisites, you can proceed to the next step, which is installing the SSL Issuer. The process is nearly identical to that of installing an SSL Issuer for a standard Kubernetes cluster, as detailed in this guide:

How to get Free SSL Certificate for Kubernetes Cluster using Let’s Encrypt
Using SSL is essential for any website that wants to protect its users’ sensitive information. Without SSL, data can be intercepted and stolen by hackers, putting users’ privacy and security at risk.

Except, we must change spec.acme.solvers.http01.ingress.class to public

Install it

~$ kubectl apply -f letsencrypt-microk8s.yml

Setup Ingress

Finally, we can setup Ingress for our application running on MicroK8s. This is standard Ingress configuration except we set kubernetes.io/ingress.class as public.

Boom! Done, you have the most popular Ingress Controller running on your single node Kubernetes Cluster.


About 8grams

We are a small DevOps Consulting Firm that has a mission to empower businesses with modern DevOps practices and technologies, enabling them to achieve digital transformation, improve efficiency, and drive growth.

Ready to transform your IT Operations and Software Development processes? Let's join forces and create innovative solutions that drive your business forward.

Subscribe to our newsletter for cutting-edge DevOps practices, tips, and insights delivered straight to your inbox!