Skip to main content

Kubernetes agent

AtherOps monitors Kubernetes clusters with atherops-k8s-otel-agent, a DaemonSet that runs one pod per node. It follows the same wrapper/proxy pattern as the Linux agent: it supervises otelcol-contrib as a child process and routes all telemetry through a loopback HMAC auth-proxy before anything leaves the node.

Status

atherops-k8s-otel-agent is the active Kubernetes agent. The original atherops-agent DaemonSet is frozen (no new development) and should not be used for new deployments.

How it works

  1. Install token registration. On first boot the agent calls POST /api/clusters/register with a one-time install token. The API mints an API key and writes it to a Kubernetes Secret. On subsequent restarts the agent reads the key from the Secret and skips registration.
  2. Supervised collector. The wrapper renders the cluster's OTel Collector config, starts otelcol-contrib, and restarts it if it crashes.
  3. Loopback proxy. The collector sends plaintext OTLP to 127.0.0.1:9599. The proxy signs each request with HMAC and forwards to the backend.
  4. Heartbeat + key rotation. Periodic POST /heartbeat keeps the cluster marked online. When X-Key-Age-Days crosses the rotation threshold, the agent calls POST /api/clusters/rotate-key to mint a new key (5-minute overlap window).

What it collects

The agent collects the same signal types as the Linux agent:

SignalSourceWhere it lands
MetricsOTel host metrics receiver, kubelet/cAdvisor scrapeVictoriaMetrics
LogsKubernetes pod logs via OTel k8s log receiverClickHouse
TracesOTLP spans from apps in the clusterClickHouse

Multi-tenant isolation

org_id is always derived server-side from the API key. A cluster agent cannot write into another tenant's data. See Multi-tenant isolation.

Comparison with the Linux agent

atherops-otel-agent (Linux)atherops-k8s-otel-agent (K8s)
Deploy targetSingle Linux hostKubernetes cluster (DaemonSet)
Identity tablehostsclusters
Register endpointPOST /api/v1/agents/registerPOST /api/clusters/register
Heartbeat endpointPOST /ingest/agents/heartbeatPOST /heartbeat
Key rotationNot implementedAutomatic (age threshold)
Remote configYes (GET /api/v1/agents/{id}/config)None
Credential store/etc/atherops/credentials.jsonKubernetes Secret

See also