> For the complete documentation index, see [llms.txt](https://docs.pagerly.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.pagerly.io/sre-ai-agent/data-sources/kubernetes-agent.md).

# Kubernetes (Agent)

## What the Agent Can Do

Same capabilities as [Kubernetes (Direct)](/sre-ai-agent/data-sources/kubernetes.md) — pods, deployments, logs, events — but via a lightweight agent running inside your cluster.

## How It Works

1. Register your cluster to get an API key
2. Deploy our agent using Helm
3. The agent connects **outbound** to Pagerly — no inbound firewall rules needed

The agent runs in your cluster and proxies K8s API calls securely.

## Setup Instructions

1. Go to the [SRE Agent Integrations](https://workspace.pagerly.io/integrations/sre-agent) page
2. Select **Kubernetes (Agent)**
3. Register your cluster to get a unique API key
4. Deploy using Helm:

```bash
helm repo add pagerly https://charts.pagerly.io
helm install pagerly-agent pagerly/pagerly-agent \
  --set apiKey=YOUR_API_KEY \
  --namespace pagerly --create-namespace
```

{% hint style="success" %}
**Recommended for production.** This approach is more secure than exposing your K8s API directly — the agent only makes outbound connections.
{% endhint %}

## Docs

* [Pagerly K8s Agent Docs](https://docs.pagerly.io/integrations/kubernetes-agent)
