TINY(1)General Commands ManualTINY(1)

Custom images

tiny new --image golang:1.26 "…"
tiny new --image maven:3-eclipse-temurin-21 "…"
tiny new --image quay.io/buildah/stable --user 1000 "…"
tiny new --image registry.internal/yourco/dev:latest "…"

How injection works

You don't bake an agent image. An init container copies the payload (claude, codex, a static tmux, tiny-notify, the entrypoint; for gemini sessions also Node and the Gemini CLI) into a shared volume, and your image runs with that mounted at /tiny. Your image itself is untouched.

The contract your image must meet is deliberately small:

  • glibc (debian/ubuntu/fedora-family tags; alpine/musl won't run claude or gemini — codex, a static musl binary, runs anywhere; gemini's Node also needs libstdc++, which those families have)
  • git
  • /bin/sh

If the contract is broken, the pod fails at start with the reason shown in the fleet row.

Sizing and identity

--cpu / --memory set requests (memory is also the limit, so a runaway build OOMs its own session, not the node). --user overrides the uid for images whose tooling is wired to one — buildah's rootless machinery needs its build user (1000), or subuid lookups fail.

Confinement, and --unconfined

Every container in a session pod runs under the "restricted" Pod Security Standard: the runtime's default seccomp profile, every Linux capability dropped, no privilege escalation (so a setuid binary in the image gains nothing), non-root. Claude Code, Codex, tmux, git and the package managers need none of what that removes. It is what stands between "an attacker owns the agent's uid" and "an attacker owns the node".

Rootless buildah and podman are the exception: user namespaces and the newuidmap setuid helper are exactly what the profile forbids. --unconfined lifts the seccomp profile and the capability drop for that session — and only that. The uid stays non-root, the network policy still applies, and the pod still holds no keys.

tiny new --image quay.io/buildah/stable --user 1000 --unconfined "…"

Sandboxed runtimes: gVisor and Kata

The restricted profile hardens the container, but its system calls still reach the node's kernel, so a kernel exploit is the remaining way out. A sandboxed runtime closes that path. Under gVisor the agent's system calls hit a user-space kernel; under Kata Containers, a lightweight VM.

tiny new --runtime-class gvisor "…"

or spec.runtimeClassName: gvisor on the Session.

To sandbox every new session in the namespace, not one at a time:

tiny sandbox on          # gvisor; or name another class: tiny sandbox on kata
tiny sandbox             # on or off
tiny sandbox off

tiny refuses a class the cluster doesn't have, since every new session would then fail to start. The class is written into each new session's spec, so kubectl get session -o yaml shows what it runs under, and changing the setting never moves a session that's already running. A session can still name its own class, or opt out with --runtime-class none (for rootless buildah, which gVisor won't run). The setting covers sessions created any way, kubectl and the Go package included. The Tiny Systems app turns it on when it installs gVisor on a computer.

What it changes, and what it doesn't

gVisor closes one specific path. It's worth having where that path matters, and it's not a substitute for anything else on this page.

default (restricted profile) with --runtime-class gvisor
kernel exploit escapes to the node possible: the kernel is shared blocked: system calls hit gVisor's own kernel
container-escape tricks (capabilities, setuid) blocked blocked
steal the model key, spend quota possible still possible
send data out over HTTPS the allow-list decides unchanged: the allow-list decides
read and change the workspace possible still possible
speed native slower on system-call-heavy work: builds, npm install
setup none gVisor on the cluster; rootless buildah won't run

Use it for sessions that run code you trust least: dependencies pulled during a task, generated scripts, untrusted repos. The interactive diagram on the home page lets you switch it on and watch which verdict changes.

Turning it on

tiny installs no runtime: the RuntimeClass has to exist on the cluster, and tiny new refuses a name that doesn't. Tested with gVisor 20261102.0 on k3s: Claude Code, git, npm through the egress proxy and the MCP sidecar all work. Expect slower system-call-heavy work such as large builds, and don't expect rootless buildah to run under it.

By provider

Two of these we run ourselves; the rest come from each provider's own documentation and are marked as such. The runtime class name isn't the same everywhere, which is why --runtime-class takes any name.

platform sandbox --runtime-class tested by us
GKE gVisor (GKE Sandbox) gvisor yes
k3s, your own nodes gVisor, installed by you gvisor yes
AKS Kata VMs (Pod Sandboxing) kata-vm-isolation no
minikube gVisor addon gvisor no
EKS none managed gvisor, if you install it no

GKE

An existing node pool can't be switched over, so create one with GKE Sandbox. This one is spot and scales to zero, so it costs nothing while no session uses it:

gcloud container node-pools create gvisor-spot \
  --cluster=CLUSTER --zone=ZONE \
  --sandbox type=gvisor --spot --machine-type=e2-standard-2 \
  --image-type=COS_CONTAINERD \
  --enable-autoscaling --min-nodes=0 --max-nodes=1 --num-nodes=0

tiny new --runtime-class gvisor "…"

GKE creates the gvisor RuntimeClass and steers pods that use it onto that pool. The cluster still needs one ordinary pool for system pods, and shared-core machine types (e2-micro, e2-small) aren't supported. With the pool at zero, the first gVisor session waits a minute or two for a node.

AKS (not tested by us)

Pod Sandboxing runs each pod in a Kata VM with its own kernel. It needs Azure Linux nodes on a VM size with nested virtualization:

az aks nodepool add --cluster-name CLUSTER --resource-group RG --name kata \
  --os-sku AzureLinux --workload-runtime KataVmIsolation \
  --node-vm-size Standard_D4s_v3 --node-count 1
az aks update --name CLUSTER --resource-group RG

tiny new --runtime-class kata-vm-isolation --memory 4Gi "…"

Two things differ from gVisor. Each pod VM gets a fixed amount of memory equal to the pod's memory limit, and only 512 MiB without one, which is too little for a coding agent, so always pass --memory. And AKS doesn't steer these pods to the Kata pool by itself: put nodeSelector: {kubernetes.azure.com/agentpool: kata} in the Session's spec.nodeSelector, or have your cluster admin add it to the RuntimeClass under scheduling.nodeSelector.

minikube (not tested by us)

Handy for trying it locally:

minikube start --container-runtime=containerd
minikube addons enable gvisor
tiny new --runtime-class gvisor "…"

EKS (not tested by us)

There's no managed gVisor or Kata option. You can install gVisor on your nodes with a launch template that runs the install step from the k3s recipe below and registers runsc with containerd. Kata on EC2 needs bare-metal instances. Fargate already gives every pod its own microVM, but it doesn't support the EBS volumes tiny uses for workspaces by default, so it isn't a drop-in.

k3s and your own nodes

Install the release tarball next to the containerd shim, register the runtime, and create the RuntimeClass:

U=https://storage.googleapis.com/gvisor/releases/release/20261102.0/$(uname -m)
wget $U/gvisor.tar.bz2 $U/gvisor.tar.bz2.sha512 && sha512sum -c gvisor.tar.bz2.sha512
sudo tar -xjf gvisor.tar.bz2 -C /usr/local/bin   # keeps runsc next to gvisor-bin/

sudo tee /var/lib/rancher/k3s/agent/etc/containerd/config.toml.tmpl <<'TOML'
{{ template "base" . }}

[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runsc]
  runtime_type = "io.containerd.runsc.v1"

[plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runsc.options]
  TypeUrl = "io.containerd.runsc.v1.options"
  ConfigPath = "/etc/containerd/runsc.toml"
TOML
printf '[runsc_config]\n  overlay2 = "none"\n' | sudo tee /etc/containerd/runsc.toml
sudo systemctl restart k3s

kubectl apply -f - <<'YAML'
apiVersion: node.k8s.io/v1
kind: RuntimeClass
metadata: {name: gvisor}
handler: runsc
YAML

overlay2 = "none" is for older kernels: on Ubuntu 20.04's 5.4 kernel, gVisor's default rootfs overlay fails with "function not implemented". Newer kernels can drop that file and the options block.

Builders: images made inside the namespace

With the registry cache on, $TINY_REGISTRY is set in every session and the cache doubles as a push target:

buildah bud -t app-dev . \
  && buildah push --tls-verify=false app-dev $TINY_REGISTRY/team/app-dev:1

The next session can run --image $TINY_REGISTRY/team/app-dev:1. The build, the push and the spawn all happen inside the namespace, without an external registry.