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.
Install MicroK8s:
sudo snap install microk8s --classic
Wait for MicroK8s to be ready:
microk8s status --wait-ready
Add your user to the MicroK8s group:
sudo usermod -aG microk8s ubuntu && newgrp microk8s
Set up kubeconfig:
mkdir ~/.kube microk8s config > ~/.kube/config
Access the MicroK8s dashboard:
microk8s dashboard-proxy
Step 3: Install kubectl
kubectl
is the command-line tool for interacting with Kubernetes clusters.
Download kubectl:
curl -LO https://dl.k8s.io/release/v1.31.0/bin/linux/amd64/kubectl
Install kubectl:
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
Verify kubectl installation:
kubectl version --client
Check cluster resources:
kubectl get all --all-namespaces
Step 4: Install Helm
Helm simplifies Kubernetes application management with charts, which are reusable application templates.
Download the Helm installation script:
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
Set executable permissions:
chmod 700 get_helm.sh
Run the installation script:
./get_helm.sh
Verify Helm installation:
helm version
Step 5: Verify Setup
Check MicroK8s status:
microk8s status
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