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
![](https://unixcop.com/wp-content/uploads/2022/06/image-2.png)
2. Install microK8s on Ubuntu
# sudo snap install microk8s –classic
![microk8s Ubuntu](https://unixcop.com/wp-content/uploads/2022/06/image-3.png)
Allow in firewall
![](https://unixcop.com/wp-content/uploads/2022/06/image-4.png)
3. Enable Addons
![](https://unixcop.com/wp-content/uploads/2022/06/image-5.png)
4. Check microk8s status
# microk8s status
![microk8s Ubuntu](https://unixcop.com/wp-content/uploads/2022/06/image-6.png)
# microk8s kubectl get all
![](https://unixcop.com/wp-content/uploads/2022/06/image-7.png)
5. create deployment on microk8s to verify functionality
# microk8s kubectl create deployment nginx –image=nginx:latest
![](https://unixcop.com/wp-content/uploads/2022/06/image-12.png)
Create services to access this pod application from outside
# microk8s kubectl expose deployment nginx –type=NodePort –port=80 –name=nginx-service
![microk8s Ubuntu](https://unixcop.com/wp-content/uploads/2022/06/image-13.png)
check status of NodePort service
# microk8s kubectl get svc
![](https://unixcop.com/wp-content/uploads/2022/06/image-14.png)
access the nginx server by typing your VM or machine IP on browser
http://your server IP:port
![microk8s Ubuntu](https://unixcop.com/wp-content/uploads/2022/06/image-15-1024x366.png)
Done!!!