Request change

How to run EKS Pod in Its Own Firecracker MicroVM?

WS Nitro Sandboxes on EKS with real commands. Same EC2 node: different kernel, 1 CPU vs 2, 145 MB vs 3.7 GB, 6x slower disk. All outputs inside.

How to run EKS Pod in Its Own Firecracker MicroVM?

1. What problem do Nitro Sandboxes solve?

In normal Kubernetes, all pods on a node share one Linux kernel. The kernel is the core of the operating system. It controls memory, files, network, and processes.

Think of a classroom. There are many kids and one floor. If one kid breaks the floor, everybody falls.

In technical words:

  1. An attacker finds a kernel bug in one container.
  2. The attacker uses the bug to escape from the container to the node.
  3. From the node, the attacker can reach the other pods on that node.

This is called a container escape.

   pod 1     pod 2     pod 3     pod 4
     |         |         |         |
  =======================================
         ONE SHARED LINUX KERNEL
  =======================================
              EC2 worker node

2. What are Nitro Sandboxes?

Nitro Sandboxes put each pod in its own small virtual machine, a Firecracker microVM. Each microVM has its own kernel.

Now every kid has a private room with its own floor. If one kid breaks the floor in his room, the other rooms are safe.

 +---------+  +---------+  +---------+
 |  pod 1  |  |  pod 2  |  |  pod 3  |
 | kernel  |  | kernel  |  | kernel  |
 +---------+  +---------+  +---------+
   microVM      microVM      microVM
  =======================================
        host kernel (EC2 node)
  =======================================

On Amazon EKS, you turn it on with one field in the pod spec:

spec:
  runtimeClassName: isolated-sandbox

There is no extra charge for the feature. You pay for EC2 and EKS as normal.

There are two runtime classes:

Runtime class What it does Tested in this blog
isolated-sandbox Runs the pod in its own Firecracker microVM Yes
confidential-sandbox Adds attestation, so you can prove which code runs in the VM No

3. The test plan

  1. Create one EKS cluster with Auto Mode.
  2. Run two pods with the same image on the same EC2 machine: one normal pod and one sandbox pod.
  3. Ask both pods the same questions.
  4. Compare the answers.
Test Question What it proves
1 Which kernel version and build? Two kernels or one?
2 What does /proc/version say? Kernel build details
3 How many CPUs and how much memory? VM or not?
4 When did the kernel start? The sandbox kernel boots with the pod
5 Which devices and disks? Firecracker virtio devices
6 What does Kubernetes say? Runtime class, overhead, node selector
7 Is the sandbox slower? CPU and disk speed
8 Does the network work? DNS and HTTPS
9 Can 5 sandboxes run at once? Scale and Auto Mode
10 What if I make a typo? Safety of the setting
11 What happened, in order? The start story of the sandbox pod

Two warnings:

  1. An EKS cluster costs money every hour. Delete it on the same day.
  2. Set a budget alarm before you start.

4. Step 1: Check the tools

You need three tools:

Tool What it does
AWS CLI Talks to AWS
eksctl Creates the EKS cluster
kubectl Talks to Kubernetes
aws --version
eksctl version
kubectl version --client

Output:

aws-cli/2.43.2 Python/3.14.10 Darwin/25.6.0 script-exe/arm64
0.232.0
Client Version: v1.37.3
Kustomize Version: v5.8.1

What it means: eksctl is version 0.232.0. kubectl is 1.37.3, so it matches the cluster version 1.37. Use a new eksctl. An old eksctl may not know Kubernetes 1.37.

Check that AWS knows who you are:

aws sts get-caller-identity --output json

This shows your user ID, your account number, and your ARN (the name of your IAM identity). Do not show the account number in public.

Make a work folder. Every test saves its output in results/:

mkdir -p ~/nitro-test/results
cd ~/nitro-test

5. Step 2: Set a budget alarm

This makes a monthly budget of 5 USD. AWS sends you an email when you spend 80% of it.

Put your email in a variable first, so it does not show in the command:

EMAIL="you@example.com"
ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)

aws budgets create-budget \
  --account-id "$ACCOUNT_ID" \
  --budget '{"BudgetName":"nitro-test-5usd","BudgetLimit":{"Amount":"5","Unit":"USD"},"TimeUnit":"MONTHLY","BudgetType":"COST"}' \
  --notifications-with-subscribers '[{"Notification":{"NotificationType":"ACTUAL","ComparisonOperator":"GREATER_THAN","Threshold":80,"ThresholdType":"PERCENTAGE"},"Subscribers":[{"SubscriptionType":"EMAIL","Address":"'"$EMAIL"'"}]}]'

No output means that it worked. In my recording, the budget already existed from my first test run, so I got this error:

aws: [ERROR]: An error occurred (DuplicateRecordException) when calling the CreateBudget operation: Error creating budget: nitro-test-5usd - the budget already exists.

What it means: this is not a problem. The budget is already there. Check it:

aws budgets describe-budgets --account-id "$ACCOUNT_ID" --query 'Budgets[].BudgetName' --output text

Output: nitro-test-5usd


6. Step 3: Create the EKS cluster

time eksctl create cluster \
  --name sandbox-demo \
  --region us-west-2 \
  --version 1.37 \
  --enable-auto-mode 2>&1 | tee results/00-create-cluster.txt
Flag Meaning
--name sandbox-demo The cluster name
--region us-west-2 Oregon
--version 1.37 Nitro Sandboxes need Kubernetes 1.36 or newer
--enable-auto-mode AWS manages the EC2 worker nodes. It starts nodes when pods need them and removes them when they are empty.
time Measures the real time
tee Shows the output and saves it in a file

Output (start):

2026-12-04 12:08:24 [i]  eksctl version 0.232.0
2026-12-04 12:08:24 [i]  using region us-west-2
2026-12-04 12:08:25 [i]  setting availability zones to [us-west-2b us-west-2c us-west-2a]
2026-12-04 12:08:25 [i]  subnets for us-west-2b - public:192.168.0.0/19 private:192.168.96.0/19
2026-12-04 12:08:25 [i]  subnets for us-west-2c - public:192.168.32.0/19 private:192.168.128.0/19
2026-12-04 12:08:25 [i]  subnets for us-west-2a - public:192.168.64.0/19 private:192.168.160.0/19
2026-12-04 12:08:25 [i]  using Kubernetes version 1.37
2026-12-04 12:08:25 [i]  creating EKS cluster "sandbox-demo" in "us-west-2" region with
...
2026-12-04 12:08:25 [i]  default addons metrics-server were not specified, will install them as EKS addons
...
2026-12-04 12:08:25 [i]  building cluster stack "eksctl-sandbox-demo-cluster"
2026-12-04 12:08:27 [i]  deploying stack "eksctl-sandbox-demo-cluster"
2026-12-04 12:08:57 [i]  waiting for CloudFormation stack "eksctl-sandbox-demo-cluster"

Output (end):

2026-12-04 12:22:49 [✔]  all EKS cluster resources for "sandbox-demo" have been created
2026-12-04 12:22:50 [i]  creating addon: metrics-server
2026-12-04 12:22:51 [i]  successfully created addon: metrics-server
2026-12-04 12:22:52 [i]  kubectl command should work with "/Users/ajay/.kube/config", try 'kubectl get nodes'
2026-12-04 12:22:52 [✔]  EKS cluster "sandbox-demo" in "us-west-2" region is ready
eksctl create cluster --name sandbox-demo --region us-west-2 --version 1.37    0.27s user 0.18s system 0% cpu 14:30.75 total

What it means:

  • eksctl made 3 availability zones, with a public and a private subnet in each zone.
  • It used CloudFormation to create the network, the IAM roles, and the cluster.
  • It saved the kubeconfig, so kubectl can talk to the new cluster.
  • It installed one add-on: metrics-server.
  • It took 14 minutes 31 seconds.

7. Step 4: Check the nodes and the runtime classes

kubectl get nodes -o wide 2>&1 | tee results/01-nodes-before.txt

Output:

NAME                  STATUS   ROLES    AGE    VERSION               INTERNAL-IP      EXTERNAL-IP   OS-IMAGE                                                              KERNEL-VERSION    CONTAINER-RUNTIME
i-0566d0e8684d8bbbc   Ready    <none>   2m3s   v1.37.1-eks-577a51e   192.168.163.90   <none>        Bottlerocket (EKS Auto, Standard) 2026.11.18 (aws-k8s-1.37-standard)   6.18.62 (arm64)   containerd://2.2.10+bottlerocket
i-0b6edfd2fe9b37330   Ready    <none>   2m4s   v1.37.1-eks-577a51e   192.168.112.15   <none>        Bottlerocket (EKS Auto, Standard) 2026.11.18 (aws-k8s-1.37-standard)   6.18.62 (arm64)   containerd://2.2.10+bottlerocket

What it means:

Value Meaning
2 nodes, Ready Auto Mode started 2 nodes for the metrics-server add-on
Bottlerocket (EKS Auto, Standard) The node operating system. Bottlerocket is the AWS OS for containers.
6.18.62 The kernel version. Remember this number.
arm64 These are Graviton machines, for the system add-ons
containerd://2.2.10 The container runtime

Now the most important check. A runtime class tells Kubernetes how to run a pod.

kubectl get runtimeclass 2>&1 | tee results/02-runtimeclass.txt

Output:

NAME                   HANDLER                AGE
confidential-sandbox   confidential-sandbox   7m46s
isolated-sandbox       isolated-sandbox       7m46s

What it means: the cluster has both sandbox runtime classes. The handler is the name of the runtime on the node. This cluster can run sandbox pods.


8. Step 5: Create a sandbox pod

cat > sandbox-pod.yaml <<'EOF'
apiVersion: v1
kind: Pod
metadata:
  name: sandbox-pod
spec:
  runtimeClassName: isolated-sandbox
  containers:
  - name: box
    image: public.ecr.aws/amazonlinux/amazonlinux:2023
    command: ["sleep", "infinity"]
EOF

kubectl apply -f sandbox-pod.yaml 2>&1 | tee results/03-apply-sandbox.txt
time kubectl wait --for=condition=Ready pod/sandbox-pod --timeout=600s 2>&1 | tee results/04-wait-sandbox.txt
  • The image is Amazon Linux 2023 from the AWS public registry.
  • sleep infinity keeps the pod alive for the tests.
  • runtimeClassName: isolated-sandbox is the one important line.

The pod was not ready at once. I checked it two times:

NAME          READY   STATUS              RESTARTS   AGE
sandbox-pod   0/1     ContainerCreating   0          78s

NAME          READY   STATUS    RESTARTS   AGE
sandbox-pod   1/1     Running   0          88s

What it means: first the pod was Pending. No node could run a sandbox pod yet. Auto Mode started a new special node for it (see Test 11). Then the pod was ContainerCreating, then Running.

Which machine did the sandbox pod get?

SANDBOX_NODE=$(kubectl get pod sandbox-pod -o jsonpath='{.spec.nodeName}')
echo "Sandbox node: $SANDBOX_NODE"

Output:

Sandbox node: i-023588417020b3067

This is the EC2 instance ID of the node.


9. Step 6: Create a normal pod on the same machine

For a fair test, I put the normal pod on the same EC2 machine as the sandbox pod. The nodeName field selects the exact node.

cat > normal-pod.yaml <<EOF
apiVersion: v1
kind: Pod
metadata:
  name: normal-pod
spec:
  nodeName: ${SANDBOX_NODE}
  containers:
  - name: box
    image: public.ecr.aws/amazonlinux/amazonlinux:2023
    command: ["sleep", "infinity"]
EOF

kubectl apply -f normal-pod.yaml 2>&1 | tee results/05-apply-normal.txt
time kubectl wait --for=condition=Ready pod/normal-pod --timeout=300s 2>&1 | tee results/06-wait-normal.txt

Note: the heredoc uses <<EOF (no quotes), so the shell puts the real node name in the file.

Output:

pod/normal-pod created
pod/normal-pod condition met
kubectl wait --for=condition=Ready pod/normal-pod --timeout=300s 2>&1  0.04s user 0.03s system 4% cpu 1.392 total

The normal pod was ready in 1.4 seconds, because the node and the image were already there.

kubectl get pods -o wide 2>&1 | tee results/07-pods.txt

Output:

NAME          READY   STATUS    RESTARTS   AGE     IP                NODE                  NOMINATED NODE   READINESS GATES
normal-pod    1/1     Running   0          14s     192.168.162.113   i-023588417020b3067   <none>           <none>
sandbox-pod   1/1     Running   0          2m58s   192.168.162.112   i-023588417020b3067   <none>           <none>

What it means: both pods run on the same node. Each pod has its own IP address from the VPC.

Now the nodes, with three extra columns: instance type, CPU architecture, and the sandbox label.

kubectl get nodes -L node.kubernetes.io/instance-type -L kubernetes.io/arch -L eks.amazonaws.com/nitro-sandbox 2>&1 | tee results/08-nodes-labels.txt

Output:

NAME                  STATUS   ROLES    AGE     VERSION               INSTANCE-TYPE   ARCH    NITRO-SANDBOX
i-023588417020b3067   Ready    <none>   2m59s   v1.37.1-eks-577a51e   c8a.large       amd64   true
i-0566d0e8684d8bbbc   Ready    <none>   9m3s    v1.37.1-eks-577a51e   c6g.large       arm64   false
i-0b6edfd2fe9b37330   Ready    <none>   9m4s    v1.37.1-eks-577a51e   c6g.large       arm64   false

What it means:

  • The test node is a c8a.large (AMD, amd64).
  • It has the label eks.amazonaws.com/nitro-sandbox=true. The other nodes have false.
  • Auto Mode started this special node type only for sandbox pods.

10. The tests

First, a small helper. It runs one command in both pods, prints both answers, and saves them in results/.

both() {
  local name="$1"; shift
  {
    echo "===== normal-pod ====="
    kubectl exec normal-pod -- sh -c "$*"
    echo
    echo "===== sandbox-pod ====="
    kubectl exec sandbox-pod -- sh -c "$*"
  } 2>&1 | tee "results/$name.txt"
}

Test 1: Which kernel?

A normal container has no kernel of its own. It uses the kernel of the node.

  • uname -r prints the kernel version.
  • uname -v prints the kernel build.
both T1-kernel "uname -r; uname -v"

Output:

===== normal-pod =====
6.18.62
#2 SMP PREEMPT_DYNAMIC Fri Nov 13 22:13:38 UTC 2026

===== sandbox-pod =====
6.18.62
#1 SMP PREEMPT_DYNAMIC Fri Nov 13 22:09:34 UTC 2026

What it means:

Normal pod Sandbox pod
Version (uname -r) 6.18.62 6.18.62
Build (uname -v) #2, 22:13:38 #1, 22:09:34

The version number is the same. AWS uses the same kernel version for the host and for the sandbox VM. So uname -r alone proves nothing. But the build is different: build #2 for the node, build #1 for the sandbox. These are two different kernels.

Test 2: The full kernel build line

both T2-proc-version "cat /proc/version"

Output:

===== normal-pod =====
Linux version 6.18.62 (builder@buildkitsandbox) (x86_64-bottlerocket-linux-gnu-gcc (Buildroot 2025.05.1) 13.4.0, GNU ld (GNU Binutils) 2.44) #2 SMP PREEMPT_DYNAMIC Fri Nov 13 22:13:38 UTC 2026

===== sandbox-pod =====
Linux version 6.18.62 (builder@buildkitsandbox) (x86_64-bottlerocket-linux-gnu-gcc (Buildroot 2025.05.1) 13.4.0, GNU ld (GNU Binutils) 2.44) #1 SMP PREEMPT_DYNAMIC Fri Nov 13 22:09:34 UTC 2026

What it means: same compiler, same version, but a different build number and a different build time. Two separate kernels.

Test 3: CPU and memory

A normal container sees the CPUs and the memory of the full node. A VM sees only what it got.

both T3-cpu-mem "nproc; grep MemTotal /proc/meminfo"

Output:

===== normal-pod =====
2
MemTotal:        3895828 kB

===== sandbox-pod =====
1
MemTotal:         148296 kB

What it means:

Normal pod Sandbox pod
CPUs 2 (the full c8a.large) 1
Memory about 3.7 GB (the full node) about 145 MB

Same machine, but the sandbox pod sees only its own small room. This is strong proof that the sandbox is a separate VM.

Test 4: When did the kernel start?

  • /proc/uptime: the first number is how many seconds the kernel is running.
  • /proc/cmdline: the boot settings that the kernel got when it started.
both T4-uptime-cmdline "cat /proc/uptime; cat /proc/cmdline"

Output (the boot lines are shortened):

===== normal-pod =====
611.00 1197.00
SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE=1 ... BOOT_IMAGE=/vmlinuz console=tty0 console=ttyS0,115200n8 ... nitro_enclaves.mempool=95%-1G bootconfig root=/dev/dm-0 rootwait ro ... PARTUUID=ce649228-4ffa-4184-8d0c-4e9c3ef6a225/PARTNROFF=1 ...

===== sandbox-pod =====
601.07 597.75
root=/dev/dm-0 ro rootwait console=ttyS0 initcall_blacklist=i8042_init dm-mod.create="root,,,ro,0 239216 verity 1 /dev/vda1 /dev/vda2 ..." ... pci=realloc ... swiotlb=512

What it means:

Normal pod (node kernel) Sandbox pod (VM kernel)
Uptime 611 s 601 s
Root disk in the boot line NVMe partitions (PARTUUID) /dev/vda1, a virtio disk
  • The node kernel started first. The sandbox kernel started 10 seconds later, when the sandbox pod started.
  • The boot lines are completely different. The sandbox kernel boots from a virtio disk (vda), the disk of the microVM.
  • The second number is idle time of all CPUs. It is about 2x the uptime for the node (2 CPUs) and about 1x for the sandbox (1 CPU). This matches Test 3.

Test 5: Devices and disks

Firecracker gives each VM only a few simple devices, called virtio devices, for the disk and the network. /proc/partitions shows the disks that the kernel sees.

both T5-devices "echo virtio:; ls /sys/bus/virtio/devices 2>&1; echo disks:; cat /proc/partitions; grep -m1 'model name' /proc/cpuinfo"

Output (the sandbox disk list is shortened):

===== normal-pod =====
virtio:
virtio0
disks:
major minor  #blocks  name

 259        0    4194304 nvme0n1
 259        3       4096 nvme0n1p1
 259        4      10240 nvme0n1p2
 259        5     163840 nvme0n1p3
 259        6    3768320 nvme0n1p4
 259        7      40960 nvme0n1p5
 259        8     112640 nvme0n1p6
 259        9      91136 nvme0n1p7
 259       10       1024 nvme0n1p8
 259        1   83886080 nvme1n1
 259        2   83884032 nvme1n1p1
 252        0     887844 dm-0
 251        0    1048576 zram0
model name      : AMD EPYC 9R45

===== sandbox-pod =====
virtio:
virtio0
virtio1
virtio2
virtio3
virtio4
virtio5
disks:
major minor  #blocks  name

 253        0    2097152 vda
 253        1    2089984 vda1
 253        2       5120 vda2
...

What it means:

Normal pod Sandbox pod
virtio devices 1 6
Disks nvme (how EC2 gives disks on the Nitro system) vda (virtio disks of the microVM)
CPU model AMD EPYC 9R45 AMD EPYC 9R45 (same machine)

The virtio devices and the vd disks are the signs of a Firecracker VM.

Test 6: What does Kubernetes say?

kubectl get pods -o custom-columns=NAME:.metadata.name,RUNTIME:.spec.runtimeClassName,NODE:.spec.nodeName,STATUS:.status.phase 2>&1 | tee results/T6-runtime-columns.txt

Output:

NAME          RUNTIME            NODE                  STATUS
normal-pod    <none>             i-023588417020b3067   Running
sandbox-pod   isolated-sandbox   i-023588417020b3067   Running

Same node. The runtime is <none> for the normal pod and isolated-sandbox for the sandbox pod.

Now the runtime class in detail:

kubectl describe runtimeclass isolated-sandbox 2>&1 | tee results/T6-describe-runtimeclass.txt

Output:

Name:         isolated-sandbox
Namespace:
Labels:       <none>
Annotations:  <none>
API Version:  node.k8s.io/v1
Handler:      isolated-sandbox
Kind:         RuntimeClass
Metadata:
  Creation Timestamp:  2026-12-04T06:48:33Z
  Resource Version:    667
  UID:                 4cd61b58-197b-4564-b2dc-4806bdf902e8
Overhead:
  Pod Fixed:
    eks.amazonaws.com/nitro-sandbox:  1
    Memory:                           256Mi
Scheduling:
  Node Selector:
    eks.amazonaws.com/nitro-sandbox:  true
Events:                               <none>

What it means (three important parts):

Part Value Meaning
Handler isolated-sandbox Tells containerd which runtime to use
Overhead 256Mi memory + 1 nitro-sandbox unit Kubernetes adds this to every sandbox pod. It pays for the VM itself. There is no CPU overhead.
Node selector nitro-sandbox: true A sandbox pod runs only on a node with this label

How many sandboxes can this node run?

kubectl get node "$SANDBOX_NODE" -o jsonpath='{.status.allocatable}' | tr ',' '\n' 2>&1 | tee results/T6-node-allocatable.txt

Output:

{"cpu":"1780m"
"eks.amazonaws.com/nitro-sandbox":"10"
"ephemeral-storage":"76173383962"
"hugepages-1Gi":"0"
"hugepages-2Mi":"0"
"memory":"2349Mi"
"pods":"57"}

What it means: this c8a.large node has 10 sandbox units. Each sandbox pod uses one unit. Kubernetes can schedule up to 57 pods on the node, but only 10 of them can be sandbox pods. Memory (2349 Mi) is often the real limit, because each sandbox pod also needs 256 Mi of overhead.

Test 7: Is the sandbox slower?

Both pods are on the same machine, so this is a fair test. It is a small check, not a real benchmark.

CPU: a loop that counts to 300,000.

both T7-cpu "time sh -c 'i=0; while [ \$i -lt 300000 ]; do i=\$((i+1)); done'"

Output:

===== normal-pod =====

real    0m0.470s
user    0m0.470s
sys     0m0.000s

===== sandbox-pod =====

real    0m0.511s
user    0m0.475s
sys     0m0.000s

Disk: write 200 MiB and force it to the disk with fsync.

both T7-disk "dd if=/dev/zero of=/tmp/test bs=1M count=200 conv=fsync 2>&1 | tail -1; rm -f /tmp/test"

Output:

===== normal-pod =====
209715200 bytes (210 MB, 200 MiB) copied, 0.608833 s, 345 MB/s

===== sandbox-pod =====
209715200 bytes (210 MB, 200 MiB) copied, 3.75669 s, 55.8 MB/s

What it means:

Normal pod Sandbox pod Difference
CPU loop 0.470 s 0.511 s about 9% slower
Disk write 345 MB/s 55.8 MB/s about 6x slower
  • CPU work runs at almost full speed in the VM.
  • The disk is much slower. Each write goes through the virtio disk of the VM, then to the real disk. This is the price of the strong wall. If your app writes a lot to disk, test the speed first.

Test 8: Does the network work?

First a DNS lookup of amazon.com, then an HTTPS request to the AWS website.

both T8-network "getent hosts amazon.com; curl -sI https://aws.amazon.com | head -1"

Output:

===== normal-pod =====
98.82.161.185   amazon.com
98.87.170.74    amazon.com
98.87.170.71    amazon.com
HTTP/2 200

===== sandbox-pod =====
98.82.161.185   amazon.com
98.87.170.71    amazon.com
98.87.170.74    amazon.com
HTTP/2 200

What it means: both pods resolve DNS and get HTTP/2 200 (OK). The sandbox pod still uses normal pod networking in the VPC.

Test 9: Five sandboxes at once

cat > many.yaml <<'EOF'
apiVersion: apps/v1
kind: Deployment
metadata:
  name: many-sandboxes
spec:
  replicas: 5
  selector:
    matchLabels:
      app: many-sandboxes
  template:
    metadata:
      labels:
        app: many-sandboxes
    spec:
      runtimeClassName: isolated-sandbox
      containers:
      - name: box
        image: public.ecr.aws/amazonlinux/amazonlinux:2023
        command: ["sleep", "infinity"]
        resources:
          requests:
            cpu: 250m
            memory: 256Mi
EOF

kubectl apply -f many.yaml 2>&1 | tee results/T9-apply.txt
time kubectl rollout status deployment/many-sandboxes --timeout=600s 2>&1 | tee results/T9-rollout.txt

Output:

deployment.apps/many-sandboxes created
Waiting for deployment "many-sandboxes" rollout to finish: 0 of 5 updated replicas are available...
Waiting for deployment "many-sandboxes" rollout to finish: 1 of 5 updated replicas are available...
Waiting for deployment "many-sandboxes" rollout to finish: 2 of 5 updated replicas are available...
Waiting for deployment "many-sandboxes" rollout to finish: 3 of 5 updated replicas are available...
deployment "many-sandboxes" successfully rolled out
kubectl rollout status deployment/many-sandboxes --timeout=600s 2>&1  0.06s user 0.04s system 0% cpu 47.621 total

Where did the pods go?

kubectl get pods -l app=many-sandboxes -o wide 2>&1 | tee results/T9-pods.txt
kubectl get nodes -L node.kubernetes.io/instance-type -L eks.amazonaws.com/nitro-sandbox 2>&1 | tee results/T9-nodes.txt

Output:

NAME                              READY   STATUS    RESTARTS   AGE   IP                NODE                  NOMINATED NODE   READINESS GATES
many-sandboxes-76c9fdf88f-6gh42   1/1     Running   0          61s   192.168.162.116   i-023588417020b3067   <none>           <none>
many-sandboxes-76c9fdf88f-cfvdp   1/1     Running   0          61s   192.168.162.115   i-023588417020b3067   <none>           <none>
many-sandboxes-76c9fdf88f-djlwx   1/1     Running   0          61s   192.168.122.98    i-04ba382e337c5e894   <none>           <none>
many-sandboxes-76c9fdf88f-r7z7n   1/1     Running   0          61s   192.168.122.97    i-04ba382e337c5e894   <none>           <none>
many-sandboxes-76c9fdf88f-wx6xw   1/1     Running   0          61s   192.168.122.96    i-04ba382e337c5e894   <none>           <none>
NAME                  STATUS   ROLES    AGE   VERSION               INSTANCE-TYPE   NITRO-SANDBOX
i-023588417020b3067   Ready    <none>   18m   v1.37.1-eks-577a51e   c8a.large       true
i-04ba382e337c5e894   Ready    <none>   45s   v1.37.1-eks-577a51e   c8a.large       true
i-0b6edfd2fe9b37330   Ready    <none>   24m   v1.37.1-eks-577a51e   c6g.large       false

What it means:

  • The rollout took 47.6 seconds.
  • 2 pods went to the first sandbox node. 3 pods went to a new c8a.large node (age 45s).
  • The first node did not have enough free memory. Each sandbox pod needs 256 Mi for the app plus 256 Mi overhead for the VM. So Auto Mode started one more sandbox node by itself.
  • Auto Mode also removed one of the c6g.large system nodes (only one is in the list now), because it was underused.

Now ask each of the five pods for its kernel build and uptime:

for p in $(kubectl get pods -l app=many-sandboxes -o name); do
  echo "$p | $(kubectl exec $p -- sh -c 'uname -v; cut -d" " -f1 /proc/uptime' | tr '\n' ' ')"
done 2>&1 | tee results/T9-kernels.txt

Output:

pod/many-sandboxes-76c9fdf88f-6gh42 | #1 SMP PREEMPT_DYNAMIC Fri Nov 13 22:09:34 UTC 2026 94.27
pod/many-sandboxes-76c9fdf88f-cfvdp | #1 SMP PREEMPT_DYNAMIC Fri Nov 13 22:09:34 UTC 2026 96.28
pod/many-sandboxes-76c9fdf88f-djlwx | #1 SMP PREEMPT_DYNAMIC Fri Nov 13 22:09:34 UTC 2026 59.31
pod/many-sandboxes-76c9fdf88f-r7z7n | #1 SMP PREEMPT_DYNAMIC Fri Nov 13 22:09:34 UTC 2026 61.20
pod/many-sandboxes-76c9fdf88f-wx6xw | #1 SMP PREEMPT_DYNAMIC Fri Nov 13 22:09:34 UTC 2026 63.44

What it means:

  • All five pods run kernel build #1, the sandbox kernel.
  • Each kernel has a short uptime (59 to 96 seconds) and a different value. Each pod booted its own kernel when it started. The pods on the new node have shorter uptimes, because that node started later.
  • Five pods, five microVMs, five kernels.

Test 10: What if I make a typo?

This is a real risk. If a typo quietly gave you a normal pod, you would think that you are safe, but you would not be.

cat > typo.yaml <<'EOF'
apiVersion: v1
kind: Pod
metadata:
  name: typo-pod
spec:
  runtimeClassName: isolated-sandboxx
  containers:
  - name: box
    image: public.ecr.aws/amazonlinux/amazonlinux:2023
    command: ["sleep", "infinity"]
EOF

kubectl apply -f typo.yaml 2>&1 | tee results/T10-typo.txt

Output:

Error from server (Forbidden): error when creating "typo.yaml": pods "typo-pod" is forbidden: pod rejected: RuntimeClass "isolated-sandboxx" not found

What it means: the API server refuses the pod before it exists. A typo fails loudly. It does not give you a normal pod.

Test 11: The start story of the sandbox pod

kubectl get events --field-selector involvedObject.name=sandbox-pod --sort-by=.lastTimestamp 2>&1 | tee results/T11-events-sandbox.txt
kubectl get events --sort-by=.lastTimestamp > results/T11-events-all.txt 2>&1

Output:

LAST SEEN   TYPE      REASON                OBJECT            MESSAGE
21m         Warning   FailedScheduling      pod/sandbox-pod   0/2 nodes are available: 2 node(s) had untolerated taint(s). preemption: 0/2 nodes are available: 2 Preemption is not helpful for scheduling.
20m         Normal    Scheduled             pod/sandbox-pod   Successfully assigned default/sandbox-pod to i-023588417020b3067
21m         Warning   FailedScheduling      pod/sandbox-pod   Failed to schedule pod, did not tolerate taint (taint=CriticalAddonsOnly:NoSchedule); no instance type has enough resources, requirements=eks.amazonaws.com/instance-category In [c m r], eks.amazonaws.com/instance-generation Exists ≥5, eks.amazonaws.com/nitro-sandbox In [true], eks.amazonaws.com/nodeclass In [default], karpenter.sh/capacity-type In [on-demand], karpenter.sh/initialized In [true], karpenter.sh/nodepool In [general-purpose], karpenter.sh/registered In [true], kubernetes.io/arch In [amd64], kubernetes.io/os In [linux], resources={"eks.amazonaws.com/nitro-sandbox":"1","memory":"256Mi","pods":"1"}
20m         Normal    Nominated             pod/sandbox-pod   Pod should schedule on: nodeclaim/general-purpose-ml8lr
20m         Normal    Pulling               pod/sandbox-pod   Pulling image "public.ecr.aws/amazonlinux/amazonlinux:2023"
20m         Normal    TaintManagerEviction  pod/sandbox-pod   Cancelling deletion of Pod default/sandbox-pod
20m         Normal    Pulled                pod/sandbox-pod   Successfully pulled image "public.ecr.aws/amazonlinux/amazonlinux:2023" in 1.664s (1.664s including waiting). Image size: 54567795 bytes.
20m         Normal    Created               pod/sandbox-pod   Container created
20m         Normal    Started               pod/sandbox-pod   Container started

What it means:

  1. FailedScheduling: no node could run the pod. The 2 system nodes have the taint CriticalAddonsOnly.
  2. The second message shows what the pod needs:
    - a node with nitro-sandbox = true
    - amd64
    - instance category c, m or r
    - instance generation 5 or newer
    - 1 nitro-sandbox unit and 256Mi memory (the overhead)
  3. Nominated: Auto Mode chose a new node for the pod.
  4. Scheduled: the pod got the new c8a.large node.
  5. Pulled: the image was pulled in 1.664 s.
  6. Created and Started: the microVM and the container started.

11. What happens under the hood

 pod spec (runtimeClassName: isolated-sandbox)
      |
 RuntimeClass  -> overhead: +256Mi, +1 nitro-sandbox unit
      |         -> node selector: nitro-sandbox = true
 scheduler + Auto Mode -> new c8a.large node (amd64)
      |
 kubelet on the node
      |
 containerd -> handler "isolated-sandbox"
      |
 Firecracker microVM
   - own guest kernel (build #1)
   - virtio disk (vda) and virtio net
   - the container runs inside
  1. Kubernetes reads the runtime class of the pod.
  2. The node selector sends the pod only to a node with the nitro-sandbox label. In our test, Auto Mode started a new c8a.large node for this.
  3. The overhead reserves extra memory and one sandbox unit for the VM.
  4. On the node, the kubelet asks containerd to use the isolated-sandbox handler.
  5. The handler starts a Firecracker microVM. Firecracker is the same small VM engine that AWS uses for Lambda and Fargate.
  6. The microVM boots its own small kernel and gets simple virtio devices for its disk and network.
  7. The container runs inside the VM.

So the container is behind two walls: the container wall and the VM wall. To reach the node, an attacker must break both.


12. Cleanup

A running cluster costs money every hour. Delete everything on the same day.

kubectl delete -f many.yaml --ignore-not-found
kubectl delete pod normal-pod sandbox-pod typo-pod --ignore-not-found

Output:

deployment.apps "many-sandboxes" deleted from default namespace
pod "normal-pod" deleted from default namespace
pod "sandbox-pod" deleted from default namespace

Now delete the cluster. Use --wait. Without it, eksctl only starts the delete and returns after a few seconds, while AWS is still deleting. (In my first test run without --wait, eksctl returned after 17 seconds.)

time eksctl delete cluster --name sandbox-demo --region us-west-2 --wait 2>&1 | tee results/F1-delete-cluster.txt

Output:

2026-12-04 12:53:41 [i]  deleting EKS cluster "sandbox-demo"
2026-12-04 12:53:44 [i]  deleted 0 Fargate profile(s)
2026-12-04 12:53:46 [✔]  kubeconfig has been updated
2026-12-04 12:53:48 [i]  cleaning up AWS load balancers created by Kubernetes objects of Kind Service, Ingress, or Gateway
2026-12-04 12:53:55 [i]  1 task: { delete cluster control plane "sandbox-demo" }
2026-12-04 12:53:56 [i]  will delete stack "eksctl-sandbox-demo-cluster"
2026-12-04 12:53:56 [i]  waiting for stack "eksctl-sandbox-demo-cluster" to get deleted
2026-12-04 12:53:56 [i]  waiting for CloudFormation stack "eksctl-sandbox-demo-cluster"
2026-12-04 12:54:27 [i]  waiting for CloudFormation stack "eksctl-sandbox-demo-cluster"
2026-12-04 12:55:24 [i]  waiting for CloudFormation stack "eksctl-sandbox-demo-cluster"
2026-12-04 12:56:34 [i]  waiting for CloudFormation stack "eksctl-sandbox-demo-cluster"
...

Do not trust only one message. After the delete, check three things. All three must be empty:

# 1. EKS clusters
aws eks list-clusters --region us-west-2

# 2. Running EC2 instances
aws ec2 describe-instances --region us-west-2 \
  --filters Name=instance-state-name,Values=pending,running \
  --query 'Reservations[].Instances[].[InstanceId,InstanceType]' --output table

# 3. CloudFormation stacks from eksctl
aws cloudformation list-stacks --region us-west-2 \
  --stack-status-filter CREATE_COMPLETE DELETE_IN_PROGRESS DELETE_FAILED \
  --query 'StackSummaries[?contains(StackName, `sandbox-demo`)].[StackName,StackStatus]' --output table

Check your bill the next day in Billing > Bills.

Save your results:

cd ~/nitro-test
zip -r nitro-results.zip results sandbox-pod.yaml normal-pod.yaml many.yaml typo.yaml

13. Results summary

A normal pod and a sandbox pod ran on the same c8a.large EC2 machine.

# Check Normal pod Sandbox pod Meaning
1 Kernel version 6.18.62 6.18.62 Same. The version alone proves nothing.
2 Kernel build #2, 22:13:38 #1, 22:09:34 Two different kernels
3 CPU / memory 2 CPU, 3.7 GB 1 CPU, 145 MB The sandbox is its own small VM
4 Kernel uptime 611 s 601 s The sandbox kernel booted with the pod
5 Devices / disks 1 virtio, nvme 6 virtio, vda Signs of a Firecracker VM
6 Network DNS + HTTP 200 DNS + HTTP 200 Same
7 CPU loop 0.470 s 0.511 s About 9% slower
8 Disk write 345 MB/s 55.8 MB/s About 6x slower
9 5 sandboxes - rollout 47.6 s Auto Mode added 1 node
10 Typo in the class - rejected The API server refuses the pod

Other numbers from the test:

Item Value
Cluster create time 14 min 31 s
Sandbox node type c8a.large, amd64, label nitro-sandbox=true
Sandbox units per c8a.large 10
Overhead per sandbox pod 256 Mi memory + 1 sandbox unit (no CPU)
Normal pod ready time (node already up) 1.4 s

14. When to use Nitro Sandboxes

Use a sandbox for:

  • code that you do not trust
  • AI agents that run code
  • customer code
  • CI jobs
  • multi-tenant platforms

A normal pod is often enough for:

  • your own trusted apps

Be careful when:

  • your app writes a lot to disk. In my test, the disk was about 6x slower. Test the speed first.
  • you plan capacity. Each sandbox pod needs 256 Mi of extra memory, and a c8a.large has only 10 sandbox units.

15. Problems I saw and how I fixed them

Problem Cause Fix
aws sts get-caller-identity printed nothing The AWS CLI pager hid the output export AWS_PAGER="" or add --output json
EMAIL address is invalid I left YOUR_EMAIL in the command Put the real email in a variable: EMAIL="..."
DuplicateRecordException The budget existed from the first run Not a problem. Check it with describe-budgets, or delete it first.
eksctl: exec format error for kubectl An old x86-64 Linux kubectl was in ~/.local/bin on my Mac mv ~/.local/bin/kubectl ~/.local/bin/kubectl.broken
dmesg: command not found The Amazon Linux image has no dmesg Use /proc/uptime and /proc/cmdline (Test 4)
/dev/vsock not found in both pods vsock is not visible inside the container Use /proc/partitions (Test 5)
First run: normal pod on c6a.large, sandbox on c8a.large Different machines, so the test was not fair Put the normal pod on the sandbox node with nodeName
First run: delete returned in 17 s eksctl delete is asynchronous Add --wait and check with 3 commands

16. All commands in one place

# --- before you start (off camera) ---
export AWS_PAGER=""
EMAIL="you@example.com"

# --- tools ---
aws --version
eksctl version
kubectl version --client
aws sts get-caller-identity --output json
mkdir -p ~/nitro-test/results && cd ~/nitro-test

# --- budget ---
ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
aws budgets create-budget --account-id "$ACCOUNT_ID" \
  --budget '{"BudgetName":"nitro-test-5usd","BudgetLimit":{"Amount":"5","Unit":"USD"},"TimeUnit":"MONTHLY","BudgetType":"COST"}' \
  --notifications-with-subscribers '[{"Notification":{"NotificationType":"ACTUAL","ComparisonOperator":"GREATER_THAN","Threshold":80,"ThresholdType":"PERCENTAGE"},"Subscribers":[{"SubscriptionType":"EMAIL","Address":"'"$EMAIL"'"}]}]'
aws budgets describe-budgets --account-id "$ACCOUNT_ID" --query 'Budgets[].BudgetName' --output text

# --- cluster ---
time eksctl create cluster --name sandbox-demo --region us-west-2 --version 1.37 --enable-auto-mode 2>&1 | tee results/00-create-cluster.txt
kubectl get nodes -o wide | tee results/01-nodes-before.txt
kubectl get runtimeclass | tee results/02-runtimeclass.txt

# --- sandbox pod ---
cat > sandbox-pod.yaml <<'EOF'
apiVersion: v1
kind: Pod
metadata:
  name: sandbox-pod
spec:
  runtimeClassName: isolated-sandbox
  containers:
  - name: box
    image: public.ecr.aws/amazonlinux/amazonlinux:2023
    command: ["sleep", "infinity"]
EOF
kubectl apply -f sandbox-pod.yaml
kubectl wait --for=condition=Ready pod/sandbox-pod --timeout=600s
SANDBOX_NODE=$(kubectl get pod sandbox-pod -o jsonpath='{.spec.nodeName}')
echo "Sandbox node: $SANDBOX_NODE"

# --- normal pod on the same node ---
cat > normal-pod.yaml <<EOF
apiVersion: v1
kind: Pod
metadata:
  name: normal-pod
spec:
  nodeName: ${SANDBOX_NODE}
  containers:
  - name: box
    image: public.ecr.aws/amazonlinux/amazonlinux:2023
    command: ["sleep", "infinity"]
EOF
kubectl apply -f normal-pod.yaml
kubectl wait --for=condition=Ready pod/normal-pod --timeout=300s
kubectl get pods -o wide
kubectl get nodes -L node.kubernetes.io/instance-type -L kubernetes.io/arch -L eks.amazonaws.com/nitro-sandbox

# --- helper ---
both() {
  local name="$1"; shift
  {
    echo "===== normal-pod ====="
    kubectl exec normal-pod -- sh -c "$*"
    echo
    echo "===== sandbox-pod ====="
    kubectl exec sandbox-pod -- sh -c "$*"
  } 2>&1 | tee "results/$name.txt"
}

# --- tests ---
both T1-kernel "uname -r; uname -v"
both T2-proc-version "cat /proc/version"
both T3-cpu-mem "nproc; grep MemTotal /proc/meminfo"
both T4-uptime-cmdline "cat /proc/uptime; cat /proc/cmdline"
both T5-devices "echo virtio:; ls /sys/bus/virtio/devices 2>&1; echo disks:; cat /proc/partitions; grep -m1 'model name' /proc/cpuinfo"
kubectl get pods -o custom-columns=NAME:.metadata.name,RUNTIME:.spec.runtimeClassName,NODE:.spec.nodeName,STATUS:.status.phase
kubectl describe runtimeclass isolated-sandbox
kubectl get node "$SANDBOX_NODE" -o jsonpath='{.status.allocatable}' | tr ',' '\n'
both T7-cpu "time sh -c 'i=0; while [ \$i -lt 300000 ]; do i=\$((i+1)); done'"
both T7-disk "dd if=/dev/zero of=/tmp/test bs=1M count=200 conv=fsync 2>&1 | tail -1; rm -f /tmp/test"
both T8-network "getent hosts amazon.com; curl -sI https://aws.amazon.com | head -1"
# T9: many.yaml (see Test 9), then:
kubectl apply -f many.yaml
time kubectl rollout status deployment/many-sandboxes --timeout=600s
kubectl get pods -l app=many-sandboxes -o wide
for p in $(kubectl get pods -l app=many-sandboxes -o name); do
  echo "$p | $(kubectl exec $p -- sh -c 'uname -v; cut -d" " -f1 /proc/uptime' | tr '\n' ' ')"
done
# T10: typo.yaml (see Test 10), then:
kubectl apply -f typo.yaml
kubectl get events --field-selector involvedObject.name=sandbox-pod --sort-by=.lastTimestamp

# --- cleanup ---
kubectl delete -f many.yaml --ignore-not-found
kubectl delete pod normal-pod sandbox-pod typo-pod --ignore-not-found
time eksctl delete cluster --name sandbox-demo --region us-west-2 --wait
aws eks list-clusters --region us-west-2
aws ec2 describe-instances --region us-west-2 --filters Name=instance-state-name,Values=pending,running \
  --query 'Reservations[].Instances[].[InstanceId,InstanceType]' --output table

Sources

  • AWS Compute Blog: the Nitro Sandboxes announcement (re:Invent 2026)
  • Amazon EKS User Guide: workload sandboxing (isolated-sandbox and confidential-sandbox)
  • eksctl documentation: https://eksctl.io/
  • Firecracker: https://firecracker-microvm.github.io/

If you want a test of the confidential-sandbox class and attestation, tell me in the comments of the video.

Share
Like this post?

Request a change or update

Suggest a correction or content update. The post author or an admin will be notified and can resolve or respond.

Comments (0)

No comments yet. Be the first to share your thoughts.

Leave a comment