Kubernetes

Klarsicht connects to the Kubernetes API via the pod’s ServiceAccount. No additional configuration needed — it auto-discovers the API server when running in-cluster.

Tools available to the agent

ToolWhat it doesK8s API call
get_podPod status, restart count, exit codes, resource limitsGET /api/v1/namespaces/{ns}/pods/{name}
get_logsContainer stdout/stderr (current + previous)GET /api/v1/namespaces/{ns}/pods/{name}/log
get_eventsWarning events for a pod (last 60 min)GET /api/v1/namespaces/{ns}/events
list_deploymentsAll deployments with replica counts, imagesGET /apis/apps/v1/namespaces/{ns}/deployments
get_nodeNode conditions, allocatable resources, taintsGET /api/v1/nodes/{name}

Namespace scoping

By default, the agent can inspect all namespaces. To restrict:

# values.yaml
agent:
  watchNamespaces:
    - production
    - staging

The agent will only investigate pods in the listed namespaces.

What data is accessed

  • Pod metadata (name, namespace, labels, annotations)
  • Container status (state, exit code, restart count)
  • Container logs (last 100 lines by default)
  • Kubernetes events (Warning type, last 60 minutes)
  • Deployment spec (image tags, replica counts, rollout history)
  • Node conditions (MemoryPressure, DiskPressure, Ready)

Not accessed: Secrets, ConfigMap values, volumes, exec into containers.