A senior engineer recently granted an AI‑powered coding assistant unrestricted access to the production Kubernetes cluster. The assistant received a static kubeconfig file that granted cluster‑admin privileges, and it began applying changes on live services without any human review. The result was a cascade of unintended deployments that temporarily degraded the user experience, and the team had no reliable way to trace which command triggered the failure. Without production access control, the AI assistant could cause even greater damage.
This scenario illustrates a broader problem: AI agents that interact with production infrastructure often inherit the same over‑privileged credentials that humans use. When those agents operate without a guardrail, they can execute any kubectl command, read secrets, or delete resources, and the organization loses visibility into what the agent actually did.
Why production access control matters for AI agents on Kubernetes
Production access control is the practice of limiting every request to the minimum set of permissions required for the specific task, while ensuring that each action is auditable and reversible. For AI coding agents, this means:
- Granting just‑in‑time permissions that expire after the operation completes.
- Requiring a human approval step for commands that modify critical resources.
- Masking sensitive fields such as secret values in API responses so the agent never sees raw credentials.
- Recording the entire session for replay and forensic analysis.
Without a dedicated enforcement point, the Kubernetes API server receives the request directly from the agent. The API can enforce role‑based access control (RBAC), but it cannot provide JIT approval workflows, inline masking, or session replay out of the box. The missing piece is a gateway that sits in the data path and applies these controls consistently.
Current state: unrestricted agents and missing audit
Most teams provision AI agents by copying an existing kubeconfig file into the container that runs the model. The file often contains a cluster‑admin role or a service‑account token with broad permissions. The setup satisfies the immediate need, getting the model to talk to the cluster, but it leaves three gaps:
- No real‑time approval. Any kubectl command runs immediately, even if it would delete a namespace.
- No data masking. Secrets returned by the API are exposed in plain text to the agent.
- No immutable audit trail. The Kubernetes audit log records who called the API, but it does not capture the full interactive session, making it hard to reconstruct the exact sequence of commands.
These gaps persist even when the organization has strong identity providers and strict RBAC policies, because the enforcement point is still the Kubernetes API server itself.
How hoop.dev provides the missing data‑path control
hoop.dev is an identity‑aware, layer‑7 gateway that sits between the AI coding agent and the Kubernetes API server. It proxies the connection, inspects the wire‑protocol, and enforces production access control policies before the request reaches the target.
Setup: identity and least‑privilege grants
The gateway trusts tokens issued by an OIDC or SAML provider (Okta, Azure AD, Google Workspace, etc.). The engineering team creates a service account that represents the AI agent, assigns it only the permissions needed for the specific task, and configures that account in hoop.dev. The gateway validates the token, extracts group membership, and maps it to a policy that determines whether the request can proceed.
The data path: gateway as the only enforcement point
When the agent initiates a kubectl request, it connects to hoop.dev instead of the Kubernetes API server. hoop.dev forwards the traffic to the cluster after applying its guardrails. Because all traffic passes through the gateway, hoop.dev can:
- Block dangerous commands, for example the phrase delete namespace, before they are executed.
- Route high‑risk operations to a human approver, pausing the request until approval is granted.
- Mask fields that contain secrets, ensuring the AI never sees raw credential material.
- Record the entire interactive session, including each command and response, for later replay.
These capabilities exist only because hoop.dev occupies the data path; the Kubernetes API server alone cannot provide them.
