Deploy on a kind Cluster¶
kind (Kubernetes IN Docker) is the recommended way to test in-cluster features locally, including --enable-helm, the service proxy, and plugin deployment.
Prerequisites¶
Step 1 — Create the cluster¶
Step 2 — Add the Headlamp Helm repo¶
Step 3 — Install with Helm¶
Step 4 — Create a service account and token¶
# create the service account
kubectl create serviceaccount headlamp-admin -n kube-system
# bind cluster-admin (dev/eval only — scope this down for shared clusters)
kubectl create clusterrolebinding headlamp-admin \
--clusterrole=cluster-admin \
--serviceaccount=kube-system:headlamp-admin
# generate a short-lived token (copy this output)
kubectl create token headlamp-admin -n kube-system --duration=8h
Warning
cluster-admin is convenient locally but never appropriate for shared or production clusters. Create a scoped ClusterRole covering only the resources your users need to interact with.
Step 5 — Access via port-forward¶
Open http://localhost:8080, paste the token from step 4.
Verify the deployment¶
# check the pod is running
kubectl get pods -n kube-system -l app.kubernetes.io/name=headlamp
# check --enable-helm is active
kubectl logs -n kube-system deployment/headlamp | grep -i helm
# check plugins were installed (if pluginsManager is enabled)
kubectl logs -n kube-system -l app.kubernetes.io/component=plugins-manager
Upgrade¶
To force plugin re-installation after a config change:
Tear down¶
Minimal RBAC for production-like testing¶
Instead of cluster-admin, use this scoped role that covers typical Headlamp usage:
headlamp-rbac.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: headlamp-user
rules:
- apiGroups: [""]
resources:
- pods
- pods/log
- pods/exec
- services
- endpoints
- namespaces
- nodes
- configmaps
- serviceaccounts
- secrets # needed for Helm release listing
- persistentvolumes
- persistentvolumeclaims
- events
verbs: ["get", "list", "watch"]
- apiGroups: ["apps"]
resources:
- deployments
- replicasets
- statefulsets
- daemonsets
verbs: ["get", "list", "watch", "update", "patch"]
- apiGroups: ["batch"]
resources: ["jobs", "cronjobs"]
verbs: ["get", "list", "watch"]
- apiGroups: ["networking.k8s.io"]
resources: ["ingresses", "networkpolicies"]
verbs: ["get", "list", "watch"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["get", "list", "watch"]
- apiGroups: ["helm.toolkit.fluxcd.io"] # if using Flux plugin
resources: ["helmreleases"]
verbs: ["get", "list", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: headlamp-user-binding
subjects:
- kind: ServiceAccount
name: headlamp-admin
namespace: kube-system
roleRef:
kind: ClusterRole
name: headlamp-user
apiGroup: rbac.authorization.k8s.io