OpsCanary
kubernetessecurityPractitioner

Harnessing OpenShell on Kubernetes: A Practical Guide for Platform Engineers

5 min read CNCF BlogNov 4, 2026Reviewed for accuracy
Share
Practitioner — Hands-on experience recommended

OpenShell exists to provide a secure environment for running agents within Kubernetes. As a CNCF Sandbox project initiated by NVIDIA, it tackles the challenges of agent isolation and network security. By leveraging OpenShell, you can ensure that your agents operate within strict policies, minimizing the risk of unauthorized access or data leaks.

At its core, OpenShell utilizes a gateway that manages Agent Sandboxes, transforming each sandbox into a Pod. The gateway is responsible for creating Kubernetes objects, while the Agent Sandbox specifically handles the creation of the agent Pod. Notably, the agent Pod has no outbound network access on its own. Instead, all communication goes through a supervisor, which authenticates to the gateway and performs policy checks on every request. This ensures that the agent's outbound requests are scrutinized based on destination, port, calling binary, and HTTP request before any upstream connections are opened. This layered approach to security is essential in production environments where data integrity is paramount.

In practice, deploying OpenShell requires careful preparation of your Kubernetes cluster. You need to install a CNI that enforces both ingress and egress NetworkPolicy, with Cilium being a recommended choice. Additionally, the current limitation is that OpenShell sandboxes can only be created via the Gateway API, not through the Kubernetes API. This could pose scalability challenges, as each agent requires a Supervisor Pod for strong isolation. Keep an eye on the roadmap for more flexible deployment options. As of OpenShell version 0.1.3, ensure your environment is compatible with the latest versions of Cilium and Kubernetes to avoid potential issues.

Key takeaways

  • →Understand that OpenShell is designed for safe agent execution in Kubernetes.
  • →Utilize the Gateway API to create OpenShell sandboxes, as Kubernetes API support is not yet available.
  • →Prepare your cluster with a CNI like Cilium to enforce network policies effectively.
  • →Be aware that each agent requires a Supervisor Pod, which may impact scalability in larger environments.
  • →Monitor the roadmap for updates on flexible deployment options.

Why it matters

In production, OpenShell enhances security by ensuring agents operate under strict policies, reducing the risk of vulnerabilities and unauthorized access. This is crucial for maintaining compliance and protecting sensitive data.

Code examples

Bash
openshell sandbox create –workspace demo –name policy-demo –from nicolaka/netshoot@sha256:… –no-auto-providers

When NOT to use this

The official docs don't call out specific anti-patterns here. Use your judgment based on your scale and requirements.

Want the complete reference?

Read official docs

Test what you just learned

Quiz questions written from this article

Take the quiz →
Linux FoundationSponsor

Industry-standard certifications built by the people behind Linux and Kubernetes. Earn the CKA — the gold standard Kubernetes administrator cert. OpsCanary readers get 30% off year-round with code OPSCANARY3.

Get CKA certified →

Get the daily digest

One email. 5 articles. Every morning.

No spam. Unsubscribe anytime.