Erik Lieben explores how to let coding agents run unattended inside throwaway Kubernetes sandboxes: Kata Containers, default-deny egress, and brokers that keep model and git credentials out of the pod. He shares measured results and where the design still leaks.
Key points
- Kata Containers gives each pod its own kernel; a warm npm ci took 1,775 ms versus gVisor's 2,085.
- Forgetting the `sandbox: "true"` label causes no error, but leaves the pod with no network restrictions.
- Egress is default-deny, with the allow-list kept in code and a stated reason per host.
- The model API key never enters the pod: an nginx broker overwrites auth headers, leaving only a placeholder key.
- Git goes through a broker with per-run tokens and `insteadOf`; the pull-request credential stays in the dispatcher.
- A cold NuGet restore took 438 seconds against 2 seconds warm — package cache poisoning remains an open risk.
Real-world use
- A team building a nightly pipeline where unattended agents do refactors and test fixes.
- A platform team that wants model API keys and git tokens to stay outside agent pods.
- An engineering group running ephemeral build sandboxes on Kubernetes and fighting NuGet cache cost.
- A security-minded developer comparing Kata or gVisor isolation with a full .NET toolchain image.
This summary was generated by the agent from the original post on Erik Lieben. The full text and all rights belong to its author and publisher. Go to original