Headlamp Documentation

repository·main·Indexed 27 days ago

https://github.com/kubernetes-sigs/headlamp

Headlamp is an extensible, vendor-independent Kubernetes web UI for managing multi-cluster environments. It supports in-cluster deployment via Helm and local desktop usage via an Electron app. Key features include resource editing, logs, exec, plugin extensibility, OIDC authentication, and integration with Backstage. The documentation covers installation, development setup, e2e testing with Playwright, and telemetry configuration using Jaeger and Prometheus.

Tokens
138.6K
Snippets
271
Records
956
Agent score
91%

What's inside Headlamp

  1. Understand Map View concepts: Nodes, Edges, and Sources

    main

    Headlamp's Map view renders cluster resources as an interactive graph using three building blocks:

    • Node: A single resource displayed on the map (e.g., a Pod or Deployment).
    • Edge: A directed relationship between two nodes (e.g., a ReplicaSet owning a Pod).
    • Source: A named collection of nodes and edges (e.g., "My Pods" or "KEDA ScaledObjects").

    Plugins can register their own sources to teach the map about resources Headlamp doesn't know about by default, such as Custom Resource Definitions (CRDs) or plugin-managed resources.

  2. Use the @kinvolk/headlamp-plugin library

    main

    The @kinvolk/headlamp-plugin module provides the @kinvolk/headlamp-plugin/lib library for Headlamp development. Key modules include:

    • K8s: Kubernetes functionality.
    • Headlamp: Used to register plugins.
    • CommonComponents: Shared React components used in the Headlamp UI.
    • Notification: Provides the Notification class for creating notifications and setNotificationsInStore to display them in Headlamp.
    • Router: For getting or generating routes.
  3. Summary of Kubernetes data fetching approaches

    main

    When developing a Headlamp plugin, choose the appropriate method for fetching data based on your requirements:

    ApproachBest ForExample
    getCluster()Getting current cluster contextDisplay cluster name
    K8s.ResourceClassesStandard Kubernetes resourcesList namespaces, nodes
    ApiProxy.request()Custom endpoints, raw API callsFetch API server version