Suppose you wired Python code execution into your AI agent. On your laptop, everything runs fine in Docker. In production, you hit a wall: standard containers (runc) share the host Linux kernel, security teams often block SaaS sandboxes like E2B or Modal, and Firecracker demands bare-metal servers with KVM.
Isola fills that gap—it's a self-hosted platform (Apache 2.0, v0.8.1) for running isolated sandboxes right inside your existing Kubernetes cluster.
Isolation via gVisor and Setup Without Extra Services
Instead of full VMs, Isola places gVisor (runsc) in front of each pod. Google's runtime intercepts system calls in a user-space kernel before they ever touch the host. No KVM is required, so it runs on standard EKS, GKE, or AKS nodes.
Bare runsc is just a runtime, while an agent needs an API, file I/O, and fast warm-up. Isola handles this with zero databases, Redis, or message queues by using two CRDs: Sandbox and RootfsSnapshot (sandbox.isola.run). Any OCI image like python:3.12-slim works as a base.
# Sandboxes run in isola-sandboxes, controller in isola-system
kubectl create namespace isola-sandboxes
helm install isola oci://ghcr.io/isola-run/charts/isola \
--namespace isola-system --create-namespace
kubectl port-forward -n isola-system svc/isola-api-gateway 8080:80
By default, the API Gateway stays internal to the cluster—expose it via Ingress or call it from agent pods. Config options and the OpenAPI spec live at isola.run.
SDKs, Environment Snapshots, and Network Isolation
You can drive sandboxes from Python (pip install isola-run, 3.10+) or TypeScript (npm install @isola-run/sdk, Node 22+, Bun, Deno). To avoid reinstalling numpy and pandas every time, you save the upper overlay layer as a rootfs snapshot in S3, GCS, or Azure Blob Storage and boot it fast on any node.
from isola import Isola, Network
with Isola(url="http://localhost:8080") as client:
# Enable internet access only while installing packages
prep = client.sandboxes.create(
image="python:3.12-slim",
network=Network(allow_internet_egress=True),
)
prep.commands.run("pip", "install", "numpy", "pandas")
client.rootfs_snapshots.create(
sandbox_id=prep.id, snapshot_name="datascience"
)
prep.delete()
# Boot from the snapshot with no network (deny-all)
box = client.sandboxes.create(
image="python:3.12-slim", rootfs_snapshot_name="datascience"
)
res = box.commands.run(
"python3", "-c", "import pandas; print(pandas.__version__)"
)
print(res.stdout)
box.delete()
Without network, deny-all applies by default. Even with allow_internet_egress=True, private networks and cloud metadata (169.254.169.254) remain blocked. You can restrict outbound traffic further with allowed_egress_cidrs and egress_rate_limit_bytes_per_second.
In the TypeScript SDK, file writes and commands look just as clean:
import { Isola } from "@isola-run/sdk";
// Create a sandbox, write a file, and run a command
const client = new Isola({ url: "http://localhost:8080" });
const box = await client.sandboxes.create({ image: "python:3.12-slim" });
await box.filesystem.writeText("/tmp/hi.txt", "Hello!");
const res = await box.commands.run(["cat", "/tmp/hi.txt"]);
await box.delete();
Beyond commands.run, commands.spawn supports streaming stdout/stderr and stdin. Auto-snapshotting via termination_policy=SnapshotRootfs(...) runs on clean teardown (delete(), timeout_seconds, or CRD deletion), though not on crashes. In multi-container pods, containers share localhost, making it easy to pair an agent with a database or MCP server.
Cluster Architecture and Strict Node Requirements
The platform consists of six components without tying snapshots to local node disks:
| Component | Role |
|---|---|
| Operator | Watches Sandbox and RootfsSnapshot CRDs and creates pods |
| API Gateway | REST API that proxies commands and file ops to the sidecar |
| Sandbox Sidecar | Runs commands and file I/O inside the pod |
| Snapshot Mounter | DaemonSet (NFS over rclone) feeding tar layers to gVisor |
| Snapshot Uploader | Job that uploads overlay layers to S3/GCS/Azure |
| Helm chart | Installs CRDs, operator, gateway, RBAC, and NetworkPolicy |
Before rolling this out, check four constraints. Release v0.8.1 is early (November 2026, 67 stars), so the API and chart may shift before 1.0. Nodes need containerd with RuntimeClass: gvisor, pod_annotations = ["dev.gvisor.*"] in /etc/containerd/config.toml, and allow-rootfs-tar-annotation = "true" in /etc/containerd/runsc.toml. The auto-installer (--set gvisor.installer.enabled=true) expects systemd containerd, restarts it, and leaves runsc behind on helm uninstall.
For deny-all, your CNI must enforce NetworkPolicy, and egress_rate_limit_bytes_per_second requires gVisor release-20260615.0 or newer. In multi-container pods, set CPU, memory, and ephemeral storage limits on every container: gVisor runs one sentry per pod, so leaving one container uncapped removes the CPU/memory ceiling for the whole pod or shrinks its disk.




