To install MicroK8s on Ubuntu, you can follow these steps
To install MicroK8s on Ubuntu, you can follow these steps:
1. Open a terminal on your Ubuntu machine.
2. Update your system's package list by running the following command:
sudo apt update
3. Install MicroK8s using snap, which is a package management system on Ubuntu:
sudo snap install microk8s --classic
The `--classic` flag is used to enable classic snap confinement, allowing MicroK8s to access the host system.
4. After the installation is complete, add your user to the `microk8s` group so that you can run MicroK8s commands without using `sudo`:
sudo usermod -a -G microk8s <your-username>
Replace `<your-username>` with your actual username.
5. To enable required permissions for your user, run the following command:
sudo chown -f -R <your-username> ~/.kube
6. You will need to log out and log back in for the group changes to take effect. So, close the terminal and open a new one.
7. Verify that MicroK8s is up and running by checking the status:
microk8s status --wait-ready
This command will wait until all the MicroK8s services are running.
8. To enable some useful add-ons, you can use the following commands:
microk8s enable dns dashboard storage
This will enable the DNS service, Kubernetes dashboard, and storage add-ons.
9. To access the Kubernetes dashboard, run the following command:
microk8s dashboard-proxy
This will start a local proxy, and you can access the dashboard by visiting `http://localhost:8001` in your web browser.
That's it! You have successfully installed MicroK8s on your Ubuntu machine.