How to install microk8s on Ubuntu 22.04

In this post, you will learn install microk8s on Ubuntu 22.04.

MicroK8s is a CNCF-certified upstream Kubernetes deployment that runs entirely on your workstation or edge device. Being a snap it runs all Kubernetes services natively (i.e. no virtual machines) while packing the entire set of libraries and binaries needed. Installation is limited by how fast you can download a couple of hundred megabytes and the removal of MicroK8s leaves nothing behind.

Requirement

  • OS: Ubuntu 22.04
  • snap
1: Prepare your OS
2. Install microK8s on Ubuntu

# sudo snap install microk8s –classic

microk8s Ubuntu

Allow in firewall

3. Enable Addons
4. Check microk8s status

# microk8s status

microk8s Ubuntu

# microk8s kubectl get all

5. create deployment on microk8s to verify functionality

# microk8s kubectl create deployment nginx –image=nginx:latest

Create services to access this pod application from outside

# microk8s kubectl expose deployment nginx –type=NodePort –port=80 –name=nginx-service

microk8s Ubuntu

check status of NodePort service

# microk8s kubectl get svc

access the nginx server by typing your VM or machine IP on browser

http://your server IP:port

microk8s Ubuntu

Done!!!

Fazal
Fazal
Solution Architect. passionate about exploring, deploying, and writing about new technologies related to systems, networks, cloud, and microservices.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest articles

Join us on Facebook