{"id":222629,"date":"2026-10-30T00:27:10","date_gmt":"2026-10-30T00:27:10","guid":{"rendered":"https:\/\/www.europesays.com\/ai\/222629\/"},"modified":"2026-10-30T00:27:10","modified_gmt":"2026-10-30T00:27:10","slug":"the-5-essential-layers-of-ai-agent-sandboxing-on-kubernetes","status":"publish","type":"post","link":"https:\/\/www.europesays.com\/ai\/222629\/","title":{"rendered":"The 5 essential layers of AI agent sandboxing on Kubernetes"},"content":{"rendered":"<p class=\"wp-block-paragraph\">An AI agent given autonomy to run code will inevitably run code no human has reviewed. It may install model-selected packages, run scripts generated moments earlier, and iterate until a developer\u2019s test passes; that risk is limited to a laptop. For a company, it can extend beyond the agent\u2019s workload to any workload deployed on <a href=\"https:\/\/thenewstack.io\/agentic-ai-kubernetes-management\/\" data-type=\"link\" data-id=\"https:\/\/thenewstack.io\/agentic-ai-kubernetes-management\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">shared Kubernetes infrastructure<\/a>. Cluster configurations can limit a container\u2019s system calls, but an allowed call that reaches a kernel vulnerability can still expose the underlying node.<\/p>\n<p class=\"wp-block-paragraph\">As agents proliferate, this gap has shifted workload isolation from a niche hardening requirement to a baseline need for platforms that run agents. This is a challenge our users at Oracle Cloud Infrastructure (OCI) have asked us to help solve.<\/p>\n<p class=\"wp-block-paragraph\">KubeCon + CloudNativeCon takes place in Salt Lake City, Utah, from November 9 to 12. <a href=\"https:\/\/events.linuxfoundation.org\/kubecon-cloudnativecon-north-america\/register\/\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Register now.<\/a><\/p>\n<p class=\"wp-block-paragraph\">As expected in the cloud-native space, the community has developed solutions.\u00a0These solutions exist across five layers: from the pod request, down to the node, and back up to the agent\u2019s session. Platform teams can assemble the stack rather than reinvent it, while native provider support simplifies configuration and maintenance. Managed Kubernetes services offer sandboxed pods this way, but runtimes <a href=\"https:\/\/thenewstack.io\/cpu-agentic-ai-axion\/\" data-type=\"link\" data-id=\"https:\/\/thenewstack.io\/cpu-agentic-ai-axion\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">isolate agentic workloads differently<\/a>.<\/p>\n<p class=\"wp-block-paragraph\">The following sections cover the options and tradeoffs before showing how the components fit together.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"468\" height=\"311\" src=\"https:\/\/www.europesays.com\/ai\/wp-content\/uploads\/2026\/10\/21c51667-image.png\" alt=\"The five layers of a pod sandboxing stack, each built from open-source components.\" class=\"wp-image-22842216\"\/>Figure 1. The five layers of a pod sandboxing stack, each built from open-source components.<\/p>\n<p>1. The isolation layer: choosing your risk boundary<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"468\" height=\"311\" src=\"https:\/\/www.europesays.com\/ai\/wp-content\/uploads\/2026\/10\/67746b80-image.png\" alt=\"Diagram of rgw same pod under three runtimes, with the boundary each one draws around agent code.\" class=\"wp-image-22842217\"\/>Figure 2. The same pod under three runtimes, with the boundary each one draws around agent code.<\/p>\n<p class=\"wp-block-paragraph\">First choose between minimal isolation, a restricted kernel interface, and full VM isolation. Each option comes with trade-offs between security and performance.<\/p>\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/opencontainers\/runc\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">runc<\/a> offers the greatest performance through a shared host kernel. Seccomp-based filtering restricts the system calls a process can make.<\/p>\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/gvisor.dev\/docs\/architecture_guide\/intro\/\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">gVisor<\/a> suits use cases where a restricted kernel interface is sufficient. Its user-space application kernel handles system calls instead of booting a guest Linux kernel, so the workload reaches the host through a small interface. gVisor implements a subset of Linux, so it starts quickly and packs densely. Applications must work with the interfaces Sentry implements, which can constrain agent behavior.<\/p>\n<p class=\"wp-block-paragraph\">\u201cA separate guest kernel with hardware virtualization avoids surprises where system-call emulation falls short and unexpectedly handcuffs agents.\u201d<\/p>\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/kata-containers\/kata-containers\/blob\/main\/docs\/design\/architecture\/README.md\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Kata Containers<\/a> suit use cases requiring full VM isolation. Each pod runs in a lightweight VM with its own guest kernel, at the cost of a VM boot and guest-kernel memory. Nearly anything that runs in a container runs in Kata. Agents exercise package managers, compilers, nested builds, and headless browsers. For that code, a separate guest kernel with hardware virtualization avoids surprises where system-call emulation falls short and unexpectedly handcuffs agents.<\/p>\n<p>2. The node: assembling it and accounting for it<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"685\" src=\"https:\/\/www.europesays.com\/ai\/wp-content\/uploads\/2026\/10\/e8adb0d4-image-1024x685.png\" alt=\"Inside a worker node when a pod selects the Kata runtime. Everything outside the microVM runs on the host.\" class=\"wp-image-22842218\"\/>Figure 3. Inside a worker node when a pod selects the Kata runtime. Everything outside the microVM runs on the host.<\/p>\n<p class=\"wp-block-paragraph\">Worker nodes must be configured for the selected sandboxed runtime.<\/p>\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/opencontainers\/runc\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">runc<\/a> containers use Linux namespaces to separate process, filesystem, and network views, and cgroups to control resource use. They share the host kernel. Nodes need runc configured through a runtime such as containerd, but no guest kernel or hypervisor.<\/p>\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/gvisor.dev\/docs\/architecture_guide\/intro\/\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">gVisor<\/a> handles workload system calls in Sentry, while a separate Gofer process mediates access to host-backed files. Each eligible node needs the <a href=\"https:\/\/gvisor.dev\/docs\/user_guide\/containerd\/quick_start\/\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">gVisor runtime installed and integrated with containerd<\/a>.<\/p>\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/kata-containers\/kata-containers\/blob\/main\/docs\/design\/architecture\/README.md\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Kata Containers<\/a> place each pod in a lightweight VM. Workload system calls go to the guest Linux kernel, separated from the host by hardware-backed virtualization. This adds overhead and requires bare-metal nodes or VMs that support nested virtualization. In aKernel-based Virtual Machine (<a href=\"https:\/\/linux-kvm.org\/page\/Main_Page\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">KVM<\/a>) setup, nodes need the Kata runtime shim, a supported virtual machine monitor (VMM), KVM and hardware virtualization, plus a guest kernel and image containing the kata-agent. You must maintain that guest image. A kernel CVE means patching two kernels. For use cases requiring flexibility and strict isolation, that burden may be necessary.<\/p>\n<p>3. The access layer: limiting the agent\u2019s reach<\/p>\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/thenewstack.io\/how-to-sandbox-agents\/\" data-type=\"link\" data-id=\"https:\/\/thenewstack.io\/how-to-sandbox-agents\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">A sandbox<\/a> protects the host from the agent, not from anything it\u2019s handed. Code inside can still delete a writable repository, read a mounted secret, or send data wherever the network allows. Sandbox policy matters as much as the sandbox itself:<\/p>\n<p>Network: Default-deny egress with a NetworkPolicy, then allow only the destinations a task needs, such as a package mirror or model endpoint.<\/p>\n<p>Credentials: Issue short-lived credentials scoped to the task, not long-lived tokens mounted into the pod. A leaked credential expires with the task.<\/p>\n<p>Storage: Mount repositories and data read-only unless the task needs to write, and give writable workspaces their own volume.<\/p>\n<p>Remote tools: Give API endpoints and MCP servers their own authorization. They run outside the sandbox, so its boundary does not cover them.<\/p>\n<p>4. The request: RuntimeClass<\/p>\n<p class=\"wp-block-paragraph\">Kubernetes lets users retain the standard Pod API while selected pods, including agents, opt into a more isolated runtime. <a href=\"https:\/\/kubernetes.io\/docs\/concepts\/containers\/runtime-class\/\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">RuntimeClass<\/a> lets pods select the security and performance balance they need without taxing non-agentic workloads.<\/p>\n<p class=\"wp-block-paragraph\">Additional isolation affects resource consumption and pod readiness. gVisor\u2019s Sentry processes and Kata\u2019s guest kernel, kata-agent, and VMM add memory and CPU overhead. Add measured overhead to the RuntimeClass so the Kubernetes scheduler and resource quotas account for it. Measure your workloads rather than copying an example.<\/p>\n<p class=\"wp-block-paragraph\">Cluster administrators create a RuntimeClass matching the node\u2019s configured runtime. It tells Kubernetes the runtime is available, how pods select it, and what overhead it needs:<\/p>\n<p>apiVersion: node.k8s.io\/v1<br \/>\nkind: RuntimeClass<br \/>\nmetadata:<br \/>\n  name: kata<br \/>\nhandler: kata              # runtime name in the node&#8217;s containerd config<br \/>\noverhead:<br \/>\n  podFixed:<br \/>\n    memory: &#8220;160Mi&#8221;        # example value; measure your own<br \/>\n    cpu: &#8220;250m&#8221;<br \/>\nscheduling:<br \/>\n  nodeSelector:<br \/>\n    sandbox.example.com\/kata: &#8220;true&#8221;<br \/>\nA pod opts in through the runtimeClassName field of its spec:<br \/>\napiVersion: v1<br \/>\nkind: Pod<br \/>\nmetadata:<br \/>\n  name: agent-task<br \/>\nspec:<br \/>\n  runtimeClassName: kata   # or gvisor; omit for the default runc<br \/>\n  containers:<br \/>\n  &#8211; name: workspace<br \/>\n    image: python:3.12<\/p>\n<p class=\"wp-block-paragraph\">Everything else stays the same. Workloads that do not need sandboxing omit the field and use the default runtime. A cluster can expose each runtime as a separate RuntimeClass.<\/p>\n<p>5. The session layer: Agent Sandbox<\/p>\n<p class=\"wp-block-paragraph\">Agent work comes in bursts. An agent runs code, then waits minutes or hours for the next interaction with a model or human. Keeping a VM running keeps it ready to resume work but consumes capacity. Tearing it down saves capacity but requires rebuilding it later. Warm pools offer a middle ground, but reserve capacity.<\/p>\n<p class=\"wp-block-paragraph\">\u201cAgent work comes in bursts. An agent runs code, then waits minutes or hours for the next interaction with a model or human.\u201d<\/p>\n<p class=\"wp-block-paragraph\">The <a href=\"https:\/\/github.com\/kubernetes-sigs\/agent-sandbox\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Agent Sandbox<\/a> project, owned by <a href=\"https:\/\/github.com\/kubernetes\/community\/blob\/main\/sig-apps\/README.md\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Kubernetes SIG Apps<\/a>, standardizes this choice. Its Sandbox API creates stateful single-pod environments with stable identities and persistent storage, plus extensions for templates, claims, and warm pools. It remains runtime-agnostic and leaves isolation to the selected RuntimeClass.<\/p>\n<p class=\"wp-block-paragraph\">Community projects have helped us achieve our goal of letting users run untrusted agent code on shared infrastructure using Kubernetes tools they already know. They keep workloads portable: the same pod spec runs on any conformant cluster. Security fixes and design reviews come from a network larger than any one vendor. And frameworks that integrate with Agent Sandbox do not need a new API. Thanks to the community, users can adopt these new tools without reinventing the wheel.\u00a0<\/p>\n<p class=\"wp-block-paragraph\">We are thankful to be a part of this dynamic space and excited to see it evolve.<\/p>\n<p>\t<a class=\"row youtube-subscribe-block\" href=\"https:\/\/youtube.com\/thenewstack?sub_confirmation=1\" target=\"_blank\" rel=\"nofollow noopener\"><\/p>\n<p>\n\t\t\t\tYOUTUBE.COM\/THENEWSTACK\n\t\t\t<\/p>\n<p>\n\t\t\t\tTech moves fast, don&#8217;t miss an episode. Subscribe to our YouTube<br \/>\n\t\t\t\tchannel to stream all our podcasts, interviews, demos, and more.\n\t\t\t<\/p>\n<p>\t\t\t\tSUBSCRIBE<\/p>\n<p>\t<\/a><\/p>\n<p>    Group<br \/>\n    Created with Sketch.<\/p>\n<p>\t\t<a href=\"https:\/\/thenewstack.io\/author\/mickey-boxell\/\" class=\"author-more-link\" rel=\"nofollow noopener\" target=\"_blank\"><\/p>\n<p>\t\t\t\t\t<img decoding=\"async\" class=\"post-author-avatar\" src=\"https:\/\/www.europesays.com\/ai\/wp-content\/uploads\/2026\/10\/ad240f2d-mboxell.jpg\"\/><\/p>\n<p>\n\t\t\t\t\t\t\tMickey Boxell is a Lead Principal Product Manager in the Containers and Kubernetes Services group within Oracle Cloud Infrastructure. He has been a member of the Kubernetes release team for many releases, including as the communications coordinator for Kubernetes 1.24&#8230;\t\t\t\t\t\t<\/p>\n<p>\t\t\t\t\t\tRead more from Mickey Boxell\t\t\t\t\t\t<\/p>\n<p>\t\t<\/a><\/p>\n<p>\t\t<a href=\"https:\/\/thenewstack.io\/author\/kay-singh\/\" class=\"author-more-link\" rel=\"nofollow noopener\" target=\"_blank\"><\/p>\n<p>\t\t\t\t\t<img decoding=\"async\" class=\"post-author-avatar\" src=\"https:\/\/www.europesays.com\/ai\/wp-content\/uploads\/2026\/10\/15222532-1583221052833.jpg\"\/><\/p>\n<p>\n\t\t\t\t\t\t\tKay is currently a product manager for the OCI Kubernetes Engine, helping customers run and scale their applications on Kubernetes. In his past roles at OCI, Kay has defined the strategy for various OCI services, including Functions, Monitoring, Notifications, Dashboards,&#8230;\t\t\t\t\t\t<\/p>\n<p>\t\t<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"An AI agent given autonomy to run code will inevitably run code no human has reviewed. It may&hellip;\n","protected":false},"author":2,"featured_media":222630,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[405,7537,12099,12100],"class_list":["post-222629","post","type-post","status-publish","format-standard","has-post-thumbnail","category-agentic-ai","tag-ai-agents","tag-artificial-intelligence-agents","tag-cncf","tag-post-contributed"],"_links":{"self":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts\/222629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/comments?post=222629"}],"version-history":[{"count":0,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/posts\/222629\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/media\/222630"}],"wp:attachment":[{"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/media?parent=222629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/categories?post=222629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.europesays.com\/ai\/wp-json\/wp\/v2\/tags?post=222629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}