Agentic AI
Five-Layer Approach to Securing AI Agents Running on Kubernetes
As autonomous AI agents proliferate in production environments, a stack of open-source tools spanning isolation runtimes, node configuration, access controls, and session management offers teams a practical path to sandboxing untrusted agent code safely.
1/5
The New Stack
When an AI agent gains the ability to execute code autonomously, it inevitably runs logic that no human has vetted beforehand. This becomes a critical security challenge at enterprise scale—code an agent installs, scripts it generates, or test iterations it runs could potentially extend beyond the agent's own workload to compromise other applications sharing the same Kubernetes cluster. Even with container security settings that restrict system calls, a vulnerability in the underlying kernel could expose the entire node.
As organizations deploy more autonomous agents, workload isolation has shifted from an optional hardening practice to a essential baseline requirement. Oracle Cloud Infrastructure and other cloud platforms have responded by assembling solutions across five distinct layers that work together to contain agent code safely.
Runtime isolation: the foundation layer#
The first choice involves determining your security boundary. Three main runtimes offer different isolation guarantees:
-
runc provides the best performance by sharing the host kernel, using Linux namespaces to separate process, filesystem, and network views, and controlling resources via cgroups. Seccomp filters restrict available system calls. This approach carries the highest risk if an agent exploits kernel vulnerabilities.
-
gVisor operates a user-space application kernel (Sentry) that intercepts system calls rather than forwarding them to the host kernel. A separate Gofer process manages file access. Workloads run only against the subset of Linux that Sentry implements, so startup is quick and memory dense—but some applications may not work with its restricted interface.
-
Kata Containers runs each pod in a lightweight virtual machine with its own guest Linux kernel, protected by hardware virtualization. This requires more resources and VM boot time but eliminates surprises from system-call emulation. For agents that exercise package managers, compilers, nested builds, and browser automation, a separate guest kernel with hardware backing avoids handcuffing their behavior.
Node configuration and resource accounting#
Each runtime requires specific node setup. runc needs only containerd configured; gVisor requires the gVisor runtime installed and integrated with containerd; Kata demands the Kata runtime shim, a supported virtual machine monitor, KVM, hardware virtualization support, and a guest kernel image that must be maintained separately. A kernel security fix means patching both host and guest systems.

