Skip to main content
The recommended deployment path for production. Single-replica Deployment, agent key delivered through a Kubernetes Secret.

Prerequisites

  • A Kubernetes cluster you can deploy into.
  • An agent key from the Observer console.
  • For Prometheus probes, a reachable Prometheus URL inside the cluster (typically a Service in the monitoring namespace). PROMETHEUS_SERVER_URL is optional; drop it from the manifest when the agent runs only active probes.
Proxies, private CAs and restricted egressIf the host reaches the internet through a proxy, a TLS-intercepting proxy or a private CA, or cannot pull from public registries, see Run behind a proxy or in a restricted network.

Steps

1

Create a namespace and Secret

2

Apply the Deployment

agent.yaml
The /data volume holds the local queue. An emptyDir survives container restarts but not pod rescheduling. To keep queued readings when the pod is replaced, mount a PersistentVolumeClaim on /data instead.
3

Confirm the connection

Port-forward the dashboard:
Open http://localhost:10101. The Cloud link card shows the last heartbeat within 30 seconds. The console’s Agents page marks the agent as running within 90 seconds.
Replica countRun a single replica per agent identity. The agent’s local queue uses an embedded SQLite file inside the container; running two pods with the same key splits the queue and confuses the cloud’s agent.offline detection.
PinningPin to an exact version (agent:1.7.3), or to the major tag (agent:1) to pick up 1.x releases as they ship. latest moves only when a release is tagged. Track new releases at github.com/useobserver/agent/releases and roll forward when ready.

Optional: dashboard Service

To expose the dashboard inside the cluster (without port-forward), add a ClusterIP Service. Do not expose the dashboard externally; the dashboard is operator-facing only. The dashboard binds 127.0.0.1 unless both DEBUG_DASHBOARD_HOST and DEBUG_DASHBOARD_TOKEN are set, so a Service cannot reach it by default. Add a token to the Secret:
Then add both variables to the container’s env in agent.yaml and apply it again:
agent-service.yaml
Requests through the Service, except /healthz, must send Authorization: Bearer <token>.