Kompass is a Kubernetes explorer for understanding resource relationships in real clusters. Query with patterns and browse connected topology, logs, YAML, certs, and diagnostics from one UI.
*/namespace/*, deployment/*/frontendKompass provides an interactive web UI and API for exploring topology, workloads, traffic paths, logs, YAML, certificates, and related Kubernetes metadata in one place.

Quick start (in cluster):
kubectl apply -f kubernetes.yaml
kubectl -n kompass rollout status deploy/kompass
kubectl -n kompass port-forward svc/kompass 8080:8080
Then open:
http://localhost:8080/ (web app)http://localhost:8080/api/healthz (liveness)Prerequisite: For CLI usage against a real cluster, you need a valid Kubernetes client configuration (kubeconfig) for your target context.
kubectlis the most common way to set this up, but any valid kubeconfig source works.
# List all pods in current namespace
kompass
š Kompass Context: mock-cluster, Namespace: petshop, Selectors: [*/petshop/petshop-frontend-girls], Config: mock, Cache: 32 calls | 0 hits | 32 misses | 0.0% hit rate
š deployment petshop-frontend-girls [AVAILABLE] {available=1, current=1, namespace=petshop, ready=1, replicas=1, strategy=RollingUpdate, updated=1}
āā š§© replicaset petshop-frontend-girls-598696998b [READY] {available=1, current=1, ready=1, replicas=1}
ā āā š« pod petshop-frontend-girls-598696998b-tr5ft [RUNNING] {podIP=10.244.9.240}
ā āā š§ container app [RUNNING]
ā āā š image petshop/petshop-frontend-girls:tr-6.0.6
āā š¤ service petshop-frontend-girls {ports=[8080/TCP], type=ClusterIP}
āā š spec
āā š§ container app
āā ā»ļø environment
ā āā š¬ NEO4J_URI=bolt://petshop-db-service:7687
āā š image petshop/petshop-frontend-girls:tr-6.0.6
āā š§ resources {limits=memory:512Mi, requests=cpu:100m memory:128Mi}
Output shown is truncated for readability.
# Exact resource
kompass --mock deployment/petshop/petshop-kafka
# Multiple resources
kompass --mock */petshop/* */kafka-system/*
# Wildcard patterns
kompass '*/myapp/*' # All resources in myapp namespace
kompass 'pod/*/*-api' # All pods ending with -api
kompass 'deployment/prod/*' # All deployments in prod namespace
name - Resource in default namespacenamespace/name - Resource in namespacetype/namespace/name - Exact resource*/namespace/* - All in namespace| Flag | Short | Description |
|---|---|---|
--context <name> | -c | Kubernetes context |
--namespace <name> | -n | Namespace |
--mock | Use mock data | |
--debug | -d | Enable debug logging |
--service [addr] | Start API server (localhost:8080) | |
--version | -v | Show version |
--help | -h | Show help |
go install github.com/karloie/kompass/cmd/kompass@latest
brew install karloie/tap/kompass
Download pre-built binaries from GitHub Releasesā
# Debian/Ubuntu
wget https://github.com/karloie/kompass/releases/latest/download/kompass_<version>_linux_amd64.deb
sudo dpkg -i kompass_<version>_linux_amd64.deb
# Red Hat/Fedora/CentOS
wget https://github.com/karloie/kompass/releases/latest/download/kompass_<version>_linux_amd64.rpm
sudo rpm -i kompass_<version>_linux_amd64.rpm
# Start server (default: localhost:8080)
kompass --service
# Custom port
kompass --service localhost:9090
# Bind to specific interface
kompass --service 0.0.0.0:8080
# With specific namespace and context
kompass --service --namespace production --context prod
# Using mock data
kompass --service --mock
# Enable debug logging
kompass --debug '*/petshop/*'
| Endpoint | Output | Usage |
|---|---|---|
/api/graph | Graph JSON (nodes, edges, components) | Default JSON endpoint for topology graphing. Use context, namespace, and optional selector. |
/api/tree | Tree JSON (trees + shared nodes) | Send Accept: application/json. Use context, namespace, and optional selector. |
/api/metadata | Cache/build metadata JSON | Inspect cache status plus build metadata (gitVersion, gitCommit, buildDate). |
/api/healthz | Liveness probe (ok) | Basic health endpoint for uptime checks. |
/api/readyz | Readiness probe (ok when ready) | Readiness endpoint used by probes/orchestration. |
Endpoints accept query parameters:
| Parameter | Description |
|---|---|
context | Kubernetes context to use |
selector | Resource selector (comma-separated, optional) |
namespace | Target namespace |
Graph and tree JSON responses include request metadata under request.selectors as an array.
# JSON graph
curl "http://localhost:8080/api/graph?context=in-cluster&selector=deployment/myapp/frontend&namespace=default"
# JSON tree
curl -H "Accept: application/json" "http://localhost:8080/api/tree?context=in-cluster&namespace=production&selector=pod/production/myapp"
# Cache metadata
curl "http://localhost:8080/api/metadata"
# Health check
curl "http://localhost:8080/api/healthz" # Liveness
curl "http://localhost:8080/api/readyz" # Readiness
Kompass exposes network-flow diagnostics in the Cilium tab and uses the Hubble relay gRPC API underneath. The relay address is controlled by KOMPASS_HUBBLE_ADDR:
kubectl port-forward -n kube-system svc/hubble-relay 4245:80. Default is 127.0.0.1:4245.KOMPASS_HUBBLE_ADDR=hubble-relay.kube-system.svc.cluster.local:80 (included in kubernetes.yaml).The pod app-view routes are /api/app/cilium and /api/app/cilium/watch.
If Hubble relay is unavailable, the Cilium tab shows an unavailable message and falls back to the hubble CLI if present in the container image.
make build
# Dev mode (hot reload)
make dev
# Standard build
make build
# Release build
make build-release
Runtime behavior:
kompass --service serves API endpoints on localhost:8080 by default.kompass --service 0.0.0.0:8080 to publish on all interfaces.Snapshot behavior:
make snapshot writes deterministic mock fixtures (testdata/fixtures/mock.json, testdata/fixtures/mock.txt).make snapshot-real writes real-cluster fixtures (testdata/fixtures/real.json, testdata/fixtures/real.txt).make test
make coverage
# With mock data
make mock
# Against real cluster
make real
MIT - see LICENSEā
Content type
Image
Digest
sha256:5af10b1f5ā¦
Size
117.8 MB
Last updated
7 months ago
docker pull karloie/kompass