MicroK8s: Setup Ingress Nginx Controller and Cert Manager on Kubernetes Single Node Cluster
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.
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.
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:
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:
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.