Skip to content

Kubernetes Agent

Nick Wilkinson edited this page Jul 6, 2026 · 2 revisions

Kubernetes Agent

The Kubernetes agent watches one Kubernetes cluster and reports workloads and pods to Trove.

It is intended to run in-cluster as a Deployment with read-only RBAC.

What it reports

The Kubernetes agent reports Kubernetes workload objects and child pods.

Typical service kinds include:

  • deployment
  • statefulset
  • daemonset
  • pod

Pods can link to parent workloads through Trove's parent_id model. This lets the dashboard show the relationship between a Deployment and the Pods it owns.

Deployment shape

Use the manifest in:

deploy/kubernetes/trove-agent.yaml

The manifest should include:

  • ServiceAccount
  • ClusterRole with read-only verbs
  • ClusterRoleBinding
  • Deployment for the agent
  • Secret or environment values for Trove server URL and token

Required configuration

Variable Required Purpose
TROVE_SERVER_URL yes Trove server URL reachable from the cluster.
TROVE_TOKEN yes Trove agent token.
TROVE_INTERVAL no Push interval.
TROVE_AGENT_NAME no Agent display name.

Server URL from inside the cluster

The URL must be reachable from the pod.

Good examples:

http://trove-server.trove.svc.cluster.local:8080
http://192.168.68.56:8080
https://trove.example.com

Bad unless the server is in the same pod:

http://localhost:8080

RBAC principle

The Kubernetes agent should have read-only access. It needs to list/watch/get the resources it reports. It should not have update, patch, delete, create, exec, or attach rights.

Parent-child model

Kubernetes creates a lot of child objects. Trove models this with:

services.parent_id

The agent reports parent_external_id for child pods. During ingest, the server resolves that external parent ID to the internal service ID.

This is intentionally resolved per full-state report. Parent and child are both present in the report, so ordering does not matter.

Common issues

Agent pod is running but dashboard is empty

Check logs:

kubectl logs deploy/trove-agent -n <namespace>

Look for:

  • Kubernetes API permission errors
  • push failed errors
  • DNS or network failures to the Trove server
  • 401 from the Trove server

Pods show but parent links are missing

That usually means the agent is not reporting parent_external_id, or the parent object is not included in the same report.

Too many state alerts during deployments

Pod churn can produce removed state events. If that is too noisy, trim alert types:

TROVE_ALERT_EVENTS=agent,health

See Alerts-and-Digest.

Clone this wiki locally