The short version
Narrow writes
The agent can restart pods, restart or scale Deployments, and raise CPU/memory values. A Kubernetes admission policy refuses every other field, so a compromised agent cannot change images, commands, env or volumes.
You choose what runs alone
Only actions on your allow-list run without a person. Everything else becomes an Approve/Deny request that only the account owner can answer, once, within 24 hours.
No Secrets, no shell
The agent never reads Secrets (one opt-in exception for TLS certificates, below), has no nodes/proxy, and the model never gets a shell — only typed tools with validated arguments.
What the agent can read
Read access is cluster-wide: pods, pod logs, events, ConfigMaps, workloads and nodes. Diagnosis tools only read the namespaces of the issues being diagnosed. Environment-variable values and ConfigMap data are redacted before anything is sent for AI analysis (KUBEAGENT_REVEAL_VALUES=true turns redaction off if you want it).
The agent never reads Secrets. The one exception is opt-in: --cert-secrets (Helm certificates.scanSecrets=true) lets it check kubernetes.io/tls Secrets that cert-manager does not manage. Kubernetes returns the key with each Secret, so the agent asks only for tls.crt and never stores or sends anything from it. Certificate checks for cert-manager resources need only read access to Certificates, CertificateRequests, Orders and Challenges.
The agent has no nodes/proxy permission, because that verb can reach kubelet endpoints (including exec) and bypasses admission control.
What the agent can change
The write grant is exactly: delete on pods, patch on Deployments, get/patch/update on deployments/scale, and (only together with its own admission policy) patch on NetworkPolicies, used for one change you approve: adding a DNS egress rule for the cluster DNS Service IP on port 53. RBAC cannot say “only this field”, so a ValidatingAdmissionPolicy named kubeagent-agent-guard (Kubernetes 1.30+) narrows what the agent's ServiceAccount may change on a Deployment to:
spec.replicas— at most 20 unless it is not going up; it may fall by at most half per change and never to 0.- The
kubectl.kubernetes.io/restartedAtpod-template annotation (a rollout restart). - Container and init-container
resources— onlycpuandmemoryvalues that already exist, raise-only, at most 4× per change, up to 16Gi memory and 8 CPU.
Image, command, args, env, volumes, serviceAccountName, labels and every other field are refused by the API server, whatever the agent sends. On a cluster older than 1.30 a write install is refused unless you choose --read-only or explicitly pass --allow-unguarded-writes.
A second policy, kubeagent-agent-netpol-guard, lets the agent change a NetworkPolicy only by appending exactly one egress rule: the kube-dns Service IP (read by the policy from the cluster, not supplied by the agent) on port 53 UDP and TCP, with no other peer or port. Every existing rule, selector and policy type must stay as it was. This action always waits for your Approve/Deny and can never be switched to automatic.
Read-only mode. kubeagent agent install --read-only (Helm rbac.readOnly=true) grants a ClusterRole with no delete or patch verbs at all. You still get detection, diagnosis and alerts.
Which actions run without a person
| Action | Default | Notes |
|---|---|---|
restart_pod | Runs automatically | On the default allow-list |
rollout_restart | Runs automatically | On the default allow-list |
set_resources | Needs approval | The OOMKilled fix; add it to the allow-list to run it alone. Raise-only and capped by the guard. |
scale_deployment | Needs approval | Never to 0 |
rollback_deployment | Approval only | Never automatic and never offered to the model; run by the separate executor |
| Anything else | Not available | Deleting namespaces, editing ConfigMaps, applying manifests and similar operations are outside the tool surface |
You choose the allow-list in kubeagent onboard, or with kubeagent agent install --safe-actions (none means nothing runs unattended). kubeagent agent status shows the active policy. The model proposes; code decides — the allow-list is checked in ordinary code, not in the prompt.
How approvals work
When the allow-list refuses an action, or a bad rollout has a recorded previous revision, the agent creates an approval request. It is sent to every connected channel: Slack gets Approve and Deny buttons, other channels get a link. Both open a dashboard review page that:
- requires login and is limited to the account owner;
- works once and expires after 24 hours;
- shows the exact action and parameters — the agent then runs only that action with exactly those parameters.
Every request, decision and execution is recorded in an audit log. If you run kubeagent watch from a laptop instead of the in-cluster agent, approvals are asked in that terminal, and --no-interactive denies them.
Rollbacks run in a separate, smaller component
A rollback rewrites a Deployment's pod template, which the agent's own guard refuses. Approved rollbacks are carried out by kubeagent-executor, a second component with no AI and no shell. It has its own ServiceAccount (projected token), its own API key with an executor scope that can only poll and answer its queue, RBAC limited to reading ReplicaSets and Deployments and patching Deployments, and its own admission policy (kubeagent-executor-guard) that limits that patch to spec.template and the change-cause annotation.
Before you can approve, the executor reads the cluster and posts what it found (target ReplicaSet, images, age, Deployment UID, live revision), marked “verified by executor”; the agent's own text is marked “agent-reported”. After approval it re-checks the UID, live revision and ReplicaSet hash, patches with a resourceVersion precondition, and acknowledges once. A recreated Deployment, a newer rollout or a missing revision is refused. Skip it with --no-executor; the alert then contains the kubectl rollout undo command for a person to run.
Credentials and keys
- Kubernetes credentials never leave your environment. The in-cluster agent uses its own ServiceAccount; the CLI uses your local kubectl context. Neither uploads a kubeconfig.
- Scoped API keys. The agent's key (scope
agent) can report incidents and poll approvals but gets 403 on account management: creating keys, billing, integrations, organisation changes. The executor's key can only use its queue. - Integration secrets (PagerDuty routing keys, Telegram bot tokens, Discord and Teams webhook URLs, webhook signing keys) are encrypted at rest with AES-256-GCM. Outgoing webhook payloads are HMAC-signed, and outbound calls go through an SSRF guard.
What data leaves your cluster
Monitoring never calls an AI model. Detection is rule-based and runs inside the agent. A diagnosis runs only when an incident is new or has changed, and then the agent sends the evidence for that incident — redacted resource state, events and recent log lines from the affected namespaces — through the KubeAgent API to the AI model provider. The KubeAgent API stores each incident record — the detected issues, the AI's diagnosis and the action taken — so the dashboard, alerts and weekly report can show it, along with the agent's version and approval history. The raw request sent to the AI provider and its raw response are not logged unless request logging is switched on for a support case. Records are deleted with your account. See the privacy policy for retention details.
Known limitations
We would rather you hear these from us:
- No SOC 2 or ISO 27001 certification today. If your vendor review needs one, tell us — it shapes our roadmap.
- The CLI stores its API key in plain text in
~/.kubeagent/auth.json, readable by any process running as your user. Protect it like a kubeconfig. OS keychain storage is not built yet. - The admission guard needs Kubernetes 1.30+. On older clusters use
--read-only. - AI diagnosis is a SaaS call. There is no self-hosted or bring-your-own-model option today.
Reporting a vulnerability
Email [email protected] with “security” in the subject. Please include steps to reproduce; we will acknowledge and keep you updated until it is fixed.