Part 1: How to setup Microk8s Kubernetes in Ubuntu Server | alvianaufan

BLOG IT SYSADMIN

Daftar akun digitalocean untuk mendapatkan free credit 100$.
DigitalOcean Referral Badge

What Is Kubernetes ?

Kubernetes, often abbreviated as K8s, is an open-source platform designed to automate deploying, scaling, and operating application containers. It was originally developed by Google and is now maintained by the Cloud Native Computing Foundation (CNCF). Kubernetes helps manage containerized applications in various types of environments, from physical to virtual to cloud.


 

What is Mikrok8s?

MicroK8s is a lightweight, single-node Kubernetes distribution developed by Canonical, the company behind Ubuntu. It is designed to be a low-ops, minimalistic Kubernetes installation that is easy to set up and manage. MicroK8s is suitable for various environments, including development, testing, IoT, and edge computing.

 

Install Microk8s Kubernetes in Ubuntu Server

  1. Install the package on your Ubuntu server by running the commands below:
    sudo apt update
    sudo apt install snapd
    snap install microk8s --classic
    microk8s status --wait-ready
    microk8s enable dns
    microk8s enable storage
    microk8s kubectl get all --all-namespaces
  2. You can use Dashboard Proxy or Lens Desktop to remotely access your Kubernetes GUI. If you want to access the dashboard via a browser, run the following command:
    microk8s dashboard-proxy

    – Access the kubernetes dashboard with this link https://127.0.0.1/10443
    – Copy the token you get in console, and paste it into kubernetes dashbooar token field
    – then click sign in button

  3. Remote kubernetes with Lens Desktop.
    – Get Lens Desktop on this link https://docs.k8slens.dev/getting-started/install-lens/
    – Run this command to get your kube-config

    microk8s config > ~/.kube/microk8s-config

    – Copy all the script text inside the “microk8s-config” file.
    – Open your Lens Desktop
    – Click the “+” button at the bottom right of your screen.
    – Choose the option “Add from kubeconfig.”
    – Paste all the text from the “microk8s-config” file into the Lens config text field.
    – Click the “Add cluster” button.
    – Once you complete these steps, the MicroK8s cluster will show up in your Lens.
    – Click on the cluster name to open the dashboard.How to install aaPanel on Ubuntu Server

    That’s how to install Microk8s Kubernetes on an Ubuntu server. Please write any questions or problems you have regarding this article in the comments section. 🙂



Write A Comment