Manuscript Offprint

arXiv:2610.02861

Containing the Autonomous Operator: A Defense-in-Depth Framework and Reference Architecture for Securing AI Agents on Kubernetes

Simhadri Podala Narasimha

Abstract

Large language model (LLM) agents are moving from chat interfaces into infrastructure operations, where they read telemetry, call tools, generate and execute code, and change the state of production Kubernetes clusters. This collapses a boundary that conventional cloud-native security assumes: the boundary between data and control. Content that an agent merely reads—a log line, a ticket, a tool description—can redirect what it does. This paper argues that the model must not be treated as a security boundary and that agent safety on Kubernetes is therefore an infrastructure problem: every guarantee must continue to hold under the assumption that the agent is fully compromised by prompt injection. We contribute (i) a threat model and ten-class threat taxonomy for agents operating on and within Kubernetes, aligned with emerging OWASP guidance for agentic applications; (ii) nine design principles, centered on complete mediation at the tool boundary and on breaking the combination of untrusted input, sensitive access, and external egress; (iii) a seven-layer defense-in-depth framework that maps each principle to native or widely adopted Kubernetes mechanisms—workload identity, RBAC and ValidatingAdmissionPolicy, gVisor/Kata sandboxing via the SIG Apps Agent Sandbox project, FQDN-aware egress policy, an agent/MCP gateway with policy-as-code over tool arguments, and eBPF runtime enforcement; (iv) a reference architecture with concrete policy artifacts and per-layer bindings for Amazon EKS, Azure Kubernetes Service, and Google Kubernetes Engine; and (v) a qualitative evaluation comprising a threat–control coverage matrix and four attack walkthroughs, with a proposed empirical methodology. We report no measured attack-success or overhead figures; instead we identify residual risks and the measurements needed to validate the framework.

Keywords: AI agents, agentic AI, Kubernetes, cloud-native security, prompt injection, Model Context Protocol, sandboxing, policy as code, eBPF, zero trust, least privilege, Amazon EKS, Azure AKS, Google GKE

The views expressed are the author's own and do not represent those of any employer.

1 Introduction

Operations teams are beginning to delegate real work to LLM-based agents: triaging alerts, reading logs and metrics, proposing and applying remediations, opening pull requests against GitOps repositories, and

Securing AI Agents on Kubernetes

generating ad hoc scripts to diagnose problems. Kubernetes is a natural home for these agents. It is where the workloads they manage already run, its declarative API is well suited to automated reasoning, and an ecosystem of agent frameworks, protocols, and gateways has grown around it, including the Model Context Protocol (MCP) [1], the Agent2Agent (A2A) protocol, the CNCF kagent project [2], and the Linux Foundation agentgateway project [3].

An agent that can act on a cluster is, from a security standpoint, a new kind of principal. Unlike a controller, its behavior is not fixed by code that can be reviewed: it is a function of a model, a prompt, and every piece of content that enters its context window during a task. Unlike a human operator, it does not reliably distinguish instructions from data. Indirect prompt injection—adversarial instructions embedded in content the agent retrieves rather than in the user's request—has been demonstrated against deployed LLM-integrated applications [4], and benchmark studies show that tool-using agents remain susceptible even with model-level defenses [5]. In the MCP ecosystem specifically, tool poisoning—hidden instructions in tool descriptions, schemas, or return values—has been demonstrated against widely used clients [6, 7].

For a Kubernetes operator this has a sharp consequence. Content that an agent merely reads—a container log line written by an attacker-controlled workload, an annotation on a resource, a field in an incident ticket, a tool description served by a third-party MCP server—can become a command that the agent then executes with its own credentials. The classical separation between the data plane and the control plane, on which much of cloud-native security rests, does not survive contact with an agent unless the platform reconstructs it.

This paper takes the position that the model is not a security boundary. Model alignment, system prompts, and input classifiers reduce the probability of misbehavior, but they offer no guarantee, and their failure modes are adversarially discoverable. Agent security on Kubernetes must therefore be built the way multi-tenant platform security is built: by assuming the workload is hostile and constraining what it can reach, do, and exfiltrate, regardless of what it “intends.” This framing aligns with the classical principles of least privilege and complete mediation [8] and with the confused-deputy problem [9], both of which return with new force when the deputy is an LLM.

References (41)