Resource Topology
Visualize how your Kubernetes resources relate to each other in an interactive, ArgoCD-style horizontal tree graph.
Overview
The topology graph shows the dependency tree for any resource. Starting from a root resource (e.g., a Deployment), Krust discovers all related resources — ReplicaSets, Pods, Services, Endpoints, ConfigMaps, Secrets, ServiceAccounts, PVCs — and renders them as a left-to-right tree with bezier curve edges.
Supported Root Resources
You can open a topology graph from the context menu of any of these resource types:
- Deployments — shows ReplicaSets, Pods, Services, Endpoints, ConfigMaps, Secrets, ServiceAccounts, PVCs
- StatefulSets — shows Pods, Services, Endpoints, PVCs, ConfigMaps, Secrets, ServiceAccounts
- DaemonSets — shows Pods, Services, ConfigMaps, Secrets, ServiceAccounts
- Services — shows Endpoints and target Pods
- Pods — shows ConfigMaps, Secrets, ServiceAccounts, PVCs referenced by the pod spec
- Jobs — shows Pods, ConfigMaps, Secrets, ServiceAccounts
- CronJobs — shows Jobs, Pods, and related resources
How to Use
- Right-click any resource in its list view
- Select Visualize Topology from the context menu
- A new window opens with the topology graph
Interacting with the Graph
Drag nodes
Click and drag any node to reposition it. Connected edges follow the node automatically.
Expand nodes
Nodes with a + button can be expanded to discover their own child resources. Click the + button to fetch and add child resources to the graph. A loading spinner shows while the API call is in progress.
Node types
Each node is color-coded by resource kind:
- Deployment — blue
- ReplicaSet — light blue
- Pod — green
- Service — cyan
- Endpoints — gray
- ConfigMap — purple
- Secret — yellow
- ServiceAccount — pink
- PVC — orange
- StatefulSet / DaemonSet / Job / CronJob — blue variants
Multi-Cluster Support
When using multi-cluster mode, the topology graph fetches resources from the correct cluster context. The window title shows both the resource kind and name (e.g., "Topology: Deployment/metrics-server-v1.33.0").
Technical Details
Topology discovery is implemented in the Rust core using the Kubernetes API. It resolves relationships through:
- ownerReferences — parent-child relationships (Deployment→RS→Pod)
- Label selectors — Service→Pod matching
- Endpoints targetRef — Endpoints→Pod resolution
- Pod spec references — volume mounts (ConfigMap, Secret, PVC), serviceAccountName
The graph uses a DAG-to-tree conversion (BFS depth, deepest-parent wins) to ensure clean visualization even when resources have multiple parents.