Beginner's Guide to Installing and Setting Up Helm with MicroK8s

Beginner's Guide to Installing and Setting Up Helm with MicroK8s

·

2 min read

Helm, the Kubernetes package manager, is an essential tool for simplifying application deployment and management. For beginners, setting up Helm with a Kubernetes cluster can seem daunting, but with MicroK8s, the process becomes straightforward and efficient. This guide will walk you through the complete installation and setup process for MicroK8s, kubectl, and Helm, with all necessary commands.


Step 1: Update Your System

Before starting, ensure your system is up to date:

sudo apt update

Step 2: Install and Configure MicroK8s

MicroK8s is a lightweight Kubernetes distribution that’s perfect for local development and testing.

  1. Install MicroK8s:

     sudo snap install microk8s --classic
    
  2. Wait for MicroK8s to be ready:

     microk8s status --wait-ready
    
  3. Add your user to the MicroK8s group:

     sudo usermod -aG microk8s ubuntu && newgrp microk8s
    
  4. Set up kubeconfig:

     mkdir ~/.kube
     microk8s config > ~/.kube/config
    
  5. Access the MicroK8s dashboard:

     microk8s dashboard-proxy
    

Step 3: Install kubectl

kubectl is the command-line tool for interacting with Kubernetes clusters.

  1. Download kubectl:

     curl -LO https://dl.k8s.io/release/v1.31.0/bin/linux/amd64/kubectl
    
  2. Install kubectl:

     sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
    
  3. Verify kubectl installation:

     kubectl version --client
    
  4. Check cluster resources:

     kubectl get all --all-namespaces
    

Step 4: Install Helm

Helm simplifies Kubernetes application management with charts, which are reusable application templates.

  1. Download the Helm installation script:

     curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
    
  2. Set executable permissions:

     chmod 700 get_helm.sh
    
  3. Run the installation script:

     ./get_helm.sh
    
  4. Verify Helm installation:

     helm version
    

Step 5: Verify Setup

  1. Check MicroK8s status:

     microk8s status
    
  2. Inspect MicroK8s for any issues:

     microk8s inspect
    

Conclusion

You’ve successfully installed and set up Helm with MicroK8s! With this environment, you’re ready to explore deploying and managing Kubernetes applications using Helm charts. Whether you’re practicing locally or preparing for production, this setup provides a solid foundation for mastering Kubernetes.

Happy Helming! Share your experience or any challenges in the comments below.

Thank you for reading :)
Ramya R