Repository navigation
feat(al2023): add packer scripts to support Nitro Sandboxes - #2884
Merged
Merged
Conversation
Adds an opt-in pod isolation image variant for AL2023, gated on enable_pod_isolation (default false). Pods that use the isolated-sandbox or confidential-sandbox RuntimeClass run inside their own Firecracker microVM as a Nitro Enclave sidecar; every other pod keeps running under runc. install-pod-isolation.sh: - installs the containerd shim from the runtime release archive and the guest image (EIF plus its dm-verity disk) from the same bundle as the other node components through the aws_s3 helper (so a public bucket needs no instance profile), verifying each against its .sha256 sidecar - installs Firecracker and the jailer from the upstream Firecracker release (pod_isolation_firecracker_version, default v1.18.0), verifying the tarball against the release's published .sha256.txt - installs iproute-tc and erofs-utils, which the shim execs - asserts the stock kernel is at least pod_isolation_min_kernel, the first release with the Nitro sandbox extensions, so an older base image fails the build instead of producing nodes that refuse every sandboxed pod - reserves the enclave memory pool with nitro_enclaves.mempool - installs the CRI proxy unit, and a NodeConfig drop-in that registers both runtime handlers, keeps compressed layers (discard_unpacked_layers = false), points kubelet at the proxy and labels the node eks.amazonaws.com/nitro-sandbox=true The image is built on an enclave-enabled instance and defaults to m8i.4xlarge / m8g.4xlarge. Supported for Kubernetes 1.36 and 1.37. Includes a unit test that the NodeConfig drop-in parses strictly.
fletcherw
reviewed
Nov 9, 2026
- describe the memory pool the way the Nitro Sandbox docs do: reserved at boot with nitro_enclaves.mempool, each sandbox takes its full memory from it while running, and a sandbox fails to start without it - drop iproute-tc: the shim no longer execs tc (DNS rate limiting moved to eBPF). Keep erofs-utils for mkfs.erofs - drop rootfs_path and nitro_sandbox from nitro-sandbox.toml; the shim reads neither, and attaches rootfs.ext4 from the kernel's directory - drop After=cri-proxy.service from the kubelet drop-in; Before= in cri-proxy.service already orders them - drop the larger build instance default; the build itself is not heavy
pod_isolation_min_kernel and pod_isolation_enclave_mempool become constants in install-pod-isolation.sh: they follow the kernel and the runtime, not the builder. pod_isolation_firecracker_version now defaults to "latest", resolved from the release page, and the build fails if it resolves, or is set, to a release older than v1.18.0, the first that can drive a Nitro Sandbox.
Contributor
Author
|
Dependency Review fails on main as well; the gosec findings and the x/net advisory are pre-existing and outside this change. I'll raise a separate PR to fix those |
fletcherw
approved these changes
Nov 9, 2026
16 tasks
8 tasks done
4 of 7 tasks
This was referenced Nov 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds an opt-in Nitro Sandbox image variant for AL2023, gated on enable_pod_isolation (default false). Pods that use the isolated-sandbox or confidential-sandbox RuntimeClass run inside their own Firecracker microVM as a Nitro Enclave sidecar; every other pod keeps running under runc.
Build the AMI with pod-isolation like so:
Issue #, if available:
Description of changes:
install-pod-isolation.sh:
The image is built on an enclave-enabled instance and defaults to m8i.4xlarge / m8g.4xlarge. Supported for Kubernetes 1.36 and 1.37. Includes a unit test that the NodeConfig drop-in parses strictly.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Testing Done
Built with
(x86_64, resolved 1.36.5 / 2026-11-06). Firecracker v1.18.0 came from the GitHub release, and the runtime and guest image from s3://amazon-eks/1.36.5/2026-11-06/; all checksums verified. A node from the AMI joined a 1.36 cluster with the eks.amazonaws.com/nitro-sandbox=true label. isolated-sandbox and confidential-sandbox pods ran, with networking (hostPort, a service-backed app) and an EBS volume working. An isolated pod reports its own guest kernel, not the host's.
See this guide for recommended testing for PRs. Some tests may not apply. Completing tests and providing additional validation steps are not required, but it is recommended and may reduce review time and time to merge.