Skip to content
Community

logo

Headlamp#

Headlamp is an easy-to-use and extensible Kubernetes web UI.

Headlamp was created to blend the traditional feature set of other web UIs/dashboards (i.e., to list and view resources) with added functionality.

Headlamp can be used in-cluster, where it's accessed through a web browser, or as a desktop application (using the information defined in the user's kubeconfig).

Prerequisites#

Deploy k0rdent v1.2.0: QuickStart

Install template to k0rdent#

helm upgrade --install headlamp oci://ghcr.io/k0rdent/catalog/charts/kgst --set "chart=headlamp:0.32.1" -n kcm-system
helm upgrade --install ingress-nginx oci://ghcr.io/k0rdent/catalog/charts/kgst --set "chart=ingress-nginx:4.12.3" -n kcm-system

Verify service template#

kubectl get servicetemplates -A
# NAMESPACE    NAME                            VALID
# kcm-system   headlamp-0-32-1                 true
# kcm-system   ingress-nginx-4-12-3            true

Deploy service template#

apiVersion: k0rdent.mirantis.com/v1beta1
kind: MultiClusterService
metadata:
  name: headlamp
spec:
  clusterSelector:
    matchLabels:
      group: demo
  serviceSpec:
    services:
    - template: headlamp-0-32-1
      name: headlamp
      namespace: headlamp
      values: |
        headlamp:
          ingress:
            enabled: true
            ingressClassName: nginx
            hosts:
            - host: headlamp.example.com
              paths:
                - path: "/"
                  type: Prefix
    - template: ingress-nginx-4-13-0
      name: ingress-nginx
      namespace: headlamp
      values: |
        ingress-nginx:
          controller:
            service:
              annotations:
                service.beta.kubernetes.io/azure-load-balancer-health-probe-request-path: /healthz
            hostPort:
              enabled: true

Create access token in the child cluster:

apiVersion: v1
kind: Secret
type: kubernetes.io/service-account-token
metadata:
  name: headlamp-token
  namespace: headlamp
  annotations:
    kubernetes.io/service-account.name: headlamp
    kubernetes.io/service-account.namespace: headlamp

Get the token and use it to authenticate:

kubectl get secrets headlamp-token -n headlamp -o jsonpath='{.data.token}' | base64 -d; echo