Cloud Computing, DevOps

4 Mins Read

Simplify Kubernetes Deployment with MicroK8s on Ubuntu

Voiced by Amazon Polly

Overview

MicroK8s is a lightweight, fast, and secure Kubernetes distribution designed for developers, DevOps, and edge computing. It provides a zero-ops Kubernetes experience, requiring minimal operational overhead to set up and maintain.
Kubernetes (K8s) is the gold standard for container orchestration, but its complexity often deters beginners. Due MicroK8s is a lightweight, CNCF-certified Kubernetes distribution by Canonical. It’s designed for simplicity and is perfect for developers, DevOps engineers, and home lab enthusiasts. MicroK8s produces a production-ready cluster in minutes, even on resource-constrained machines.

MicroK8s is perfect for developers looking to experiment with Kubernetes, DevOps teams needing a reliable platform for CI/CD pipelines, and software vendors seeking a robust embedded Kubernetes solution.

Pioneers in Cloud Consulting & Migration Services

  • Reduced infrastructural costs
  • Accelerated application deployment
Get Started

Why Choose MicroK8s?

  • For Developers:MicroK8s offers the quickest and simplest way to get Kubernetes up and running. Experiment with the latest upstream features, toggle services on and off, and seamlessly transition your work from development to production.
  • For DevOps:MicroK8s is ideal for mission-critical workloads, featuring self-healing high availability, transactional OTA updates, and secure sandboxed kubelet environments. Easily spin up your CI/CD pipeline nodes and reduce production maintenance costs.
  • For Software Vendors:MicroK8s provides a simple, secure, embedded Kubernetes platform. Build containerized solutions without worrying about the infrastructure, allowing you to focus on your customers.

Hassle-Free Kubernetes

Whether on ARM or Intel, under a cell tower, on Raspberry Pis, in the cloud, or on everyday appliances, MicroK8s delivers the full Kubernetes experience with a single command. Install, cluster, and enable the services you need without any hassle.

A fully isolated deployment package protects your underlying system while self-healing high availability and over-the-air updates ensure ultra-reliable operations. MicroK8s’ architecture and OS compatibility allow deployment on COTS hardware and development on any workstation.

Step-by-Step Guide

Step 1: Install MicroK8s on Ubuntu

Requirements:

  • Ubuntu 20.04/22.04/24.04 LTS
  • 4GB RAM, 20GB disk space (minimum)

Installation:

  1. Run a single command to install MicroK8s via Snap:

2. Add your user to the MicroK8s group to avoid sudo for every command:

3. Verify the installation:

step1

Step 2: Enable Essential Add-Ons

MicroK8s uses modular add-ons to extend functionality. Enable these for a fully operational cluster:

step2

  • DNS: Resolves internal service names.
  • Dashboard: Web UI for cluster management.
  • Storage: Enables persistent volumes via hostpath-storage.
  • Ingress: Manages external traffic routing (e.g., Traefik or NGINX).

Optional Add-Ons:

  • MetalLB: Assigns external IPs to services.
  • Cert-Manager: Automates SSL certificates with Let’s Encrypt.

Step 3: Access the Kubernetes Dashboard

  1. Start the proxy:

2. Retrieve the access token:

3. Open the dashboard:

Visit http://localhost:8001/api/v1/namespaces/kubernetes-dashboard/services/https:kubernetes-dashboard:/proxy/ and paste the token.

Step 4: Deploy Your First Application

Let’s deploy an NGINX web server:

  1. Create a deployment YAML file (nginx-deployment.yaml):

2. Apply the configuration:

3. Expose the service:

4. Access NGINX:

Step 5: Scale Your Cluster (Multi-Node Setup)

For high availability or distributed workloads:

  1. Add a node from the control plane:

step5

2. Join worker nodes using the generated token:

3. Verify nodes:

step5b

Advanced Tips:

  1. Alias kubectl:
    Add alias kubectl=’microk8s kubectl’ to ~/.bashrc for convenience.
  2. Persistent Storage with MicroCeph:
    Enable distributed storage across nodes.
  3. Upgrade MicroK8s:

4. Firewall Configuration:
Allow traffic for pods and services:

Why Choose MicroK8s Over Alternatives?

  • Minikube: Limited to single-node setups, not production-ready.
  • k3s: Slightly more complex for multi-node HA.
  • Docker Desktop: Resource-heavy and platform-dependent.

Conclusion

MicroK8s is the fastest path to a functional Kubernetes cluster on Ubuntu. Whether you’re building a home lab, testing CI/CD pipelines, or preparing for production, its simplicity and flexibility make it unbeatable. With add-ons like MetalLB and Traefik, you can replicate enterprise-grade setups effortlessly.

Drop a query if you have any questions regarding MicroK8s and we will get back to you quickly.

Making IT Networks Enterprise-ready – Cloud Management Services

  • Accelerated cloud migration
  • End-to-end view of the cloud environment
Get Started

About CloudThat

CloudThat is a leading provider of Cloud Training and Consulting services with a global presence in India, the USA, Asia, Europe, and Africa. Specializing in AWS, Microsoft Azure, GCP, VMware, Databricks, and more, the company serves mid-market and enterprise clients, offering comprehensive expertise in Cloud Migration, Data Platforms, DevOps, IoT, AI/ML, and more.

CloudThat is the first Indian Company to win the prestigious Microsoft Partner 2024 Award and is recognized as a top-tier partner with AWS and Microsoft, including the prestigious ‘Think Big’ partner award from AWS and the Microsoft Superstars FY 2023 award in Asia & India. Having trained 650k+ professionals in 500+ cloud certifications and completed 300+ consulting projects globally, CloudThat is an official AWS Advanced Consulting Partner, Microsoft Gold Partner, AWS Training PartnerAWS Migration PartnerAWS Data and Analytics PartnerAWS DevOps Competency PartnerAWS GenAI Competency PartnerAmazon QuickSight Service Delivery PartnerAmazon EKS Service Delivery Partner AWS Microsoft Workload PartnersAmazon EC2 Service Delivery PartnerAmazon ECS Service Delivery PartnerAWS Glue Service Delivery PartnerAmazon Redshift Service Delivery PartnerAWS Control Tower Service Delivery PartnerAWS WAF Service Delivery PartnerAmazon CloudFrontAmazon OpenSearchAWS DMS and many more.

FAQs

1. Is Docker required to use MicroK8s?

ANS: – No, Docker is not required to use MicroK8s. MicroK8s uses containerd as its container runtime, which is included by default. This means you don’t need to install Docker separately to run MicroK8s.

2. Can MicroK8s be used on other Linux Distributions?

ANS: – Yes, MicroK8s can be used on Amazon Linux and other Linux distributions that support snapd. While MicroK8s is optimized for Ubuntu, it can be installed on any Linux distribution that supports snaps.

WRITTEN BY Navneet Nirmal Toppo

Navneet is a Research Associate at CloudThat. He is a Microsoft Certified Solution Professional and a Certified Network Security Specialist and who has experience in AWS, Azure, GCP & vSphere. He is passionate about cloud computing, cybersecurity, and learning new cloud-native technologies who strives to provide the best cloud experience to clients through transparency.

Share

Comments

    Click to Comment

Get The Most Out Of Us

Our support doesn't end here. We have monthly newsletters, study guides, practice questions, and more to assist you in upgrading your cloud career. Subscribe to get them all!