Skip to main content

Kubernetes Agent

What It Is

The OpsWorker Kubernetes Agent runs inside your Kubernetes cluster. It acts as OpsWorker's data collection layer, executing read-only queries to gather the information AI agents need during investigations and chat sessions.

The agent is:

  • Deployed via a Helm chart. A default install runs the agent plus two bundled MCP server pods (a Kubernetes MCP server and a Grafana MCP server), both read-only.
  • Read-only against the cluster. It observes resources but never creates, updates, deletes, or patches them.
  • Outbound-only. It initiates all communication; no inbound ports are required.
  • Lightweight. The agent requests 100m CPU and 256Mi memory (limits 200m CPU and 512Mi memory).

Role in the System

The Kubernetes Agent is the bridge between OpsWorker's AI and your cluster:

sequenceDiagram
participant OW as OpsWorker AI
participant SQS as AWS SQS
participant Agent as K8s Agent
participant K8s as Kubernetes API

OW->>SQS: "Get logs for pod X"
Agent->>SQS: Poll for commands
Agent->>K8s: Read logs for pod X
K8s-->>Agent: Log output
Agent->>SQS: Return results
SQS-->>OW: Deliver data

During an investigation, OpsWorker's AI agents decide what data they need (for example pod logs, events, or service endpoints), and the Kubernetes Agent executes those read queries against your cluster's API.

What the Agent Can Access

The agent performs read operations only:

OperationExamples
Get/List resourcesPods, Deployments, ReplicaSets, Services, Ingresses, Events
Describe resourcesResource specifications and status
Read logsContainer logs from pods
Check endpointsService endpoint health

The agent cannot create, update, delete, or patch any resources.

Security Model

  • No cluster credentials in the cloud: the agent authenticates with a cluster token and an API key; OpsWorker has no direct (inbound) access to your cluster.
  • Outbound-only communication: via AWS SQS over TLS (port 443).
  • Built-in view RBAC: the chart binds the agent's service account to the built-in Kubernetes view ClusterRole. The view role is read-only and does not grant access to Secret values. Secret access is opt-in and disabled by default.
  • No pod exec: the agent cannot open shells or run commands in your pods.

Next Steps