Skip to content

Post 7: Installing Portainer


After getting storage sorted in our Kubernetes cluster with Longhorn for application configs and NFS for media, it’s time to give ourselves a powerful UI: Portainer.

Portainer provides a clean and intuitive dashboard to manage Kubernetes workloads. It’s especially handy when you want to visualize deployments, troubleshoot pods, or just get a better lay of the land.


Step 1: Installing Portainer via Helm

We’ll install the Portainer Business Edition (free for homelab use) using Helm. From our jumpbox (10.0.0.8), run the following commands:

helm repo add portainer https://portainer.github.io/k8s/
helm repo update

helm install portainer portainer/portainer \
  --namespace portainer --create-namespace \
  --set service.type=LoadBalancer \
  --set service.loadBalancerIP=10.0.0.31 \
  --set persistence.enabled=true \
  --set persistence.size=10Gi \
  --set persistence.storageClass=longhorn

This does the following:

  • Creates a new namespace called portainer
  • Deploys Portainer with a LoadBalancer service on a fixed MetalLB IP (10.0.0.31)
  • Stores Portainer’s config in a 10Gi PVC backed by Longhorn

Step 2: Accessing Portainer

Give the cluster a minute or two to pull the image and assign the IP. Then go to:

http://10.0.0.31:9000

On first login, it will prompt you to create an admin account.


Step 3: Managing Your Cluster

Once logged in:

  1. Click Add Environment.
  2. Choose Kubernetes.
  3. Select Local (since Portainer is running inside your cluster).
  4. It will auto-detect your cluster.

You can now:

  • See all running pods, deployments, and namespaces
  • Manage secrets, PVCs, and services
  • Deploy apps from templates or custom YAML

Step 4: Importing Existing Workloads

Portainer auto-discovers existing workloads. You’ll find your previously deployed services like:

  • WordPress
  • Kavita
  • Longhorn

Just navigate to the appropriate namespace and you’ll see your resources laid out cleanly.


Wrap Up

With Portainer installed, you’ve now got a visual control panel for your k3s cluster. It’s a great way to bridge the gap between raw YAML and intuitive management.

In the next post, we’ll look at securing your cluster access with Cloudflare Tunnel.

Published inKubernetes