Every Java or Python container image I have ever built carries its own language runtime. When a CVE lands in that runtime, every team rebuilds, rescans, and redeploys every image, even when not a single line of application code changed.

Brewlet is an open source (MIT licensed) project that flips this model. Your application image contains only your code, its dependencies, and a small launch.json descriptor. Your platform team approves language runtimes once, and a containerd shim composes the app and runtime when the container starts.

Bruno Borges introduced Brewlet at Devoxx Belgium 2026. I wanted to see what it actually takes to run it on Google Kubernetes Engine (GKE), where it breaks, and how it performs against standard containers on identical hardware.

Running Brewlet on GKE

I tested Brewlet across three GKE configurations and ran a head-to-head benchmark on GKE 1.36.4 (containerd 2.2.7) using Brewlet v0.13.1. Here is what I found:

  • Only GKE Standard with Ubuntu (UBUNTU_CONTAINERD) works. GKE Autopilot blocks the privileged provisioner via GKE Warden, and GKE Standard with Container-Optimized OS (COS) fails because / and /usr are read-only.
  • Google Distroless Java images pair naturally with Brewlet. Using gcr.io/distroless/java21-debian12:nonroot passes Brewlet’s strict non-root and zero-setuid check.
  • Image sizes drop by four orders of magnitude. The same 5,075-byte Java HTTP server shrinks from 114.61 MiB (Temurin) or 61.15 MiB (Distroless) to 6.16 KiB (19,063x and 10,171x smaller).
  • Cold pulls are 4.5x to 6.9x faster, with honest trade-offs on warm starts. Cold image pulls drop from 4.68s (Distroless) and 7.19s (Temurin) to 1.04s. On warm nodes, stock runc starts ~110 ms faster, and same-image replicas already share libjvm.so page cache on stock containerd.

Pre-1.0 disclaimer: Brewlet is still pre-1.0, and its verification page only claims validation on kind clusters. Use a disposable GKE cluster, not production.

How Brewlet works

Brewlet splits container execution into three Kubernetes resources, and only one of them touches application teams:

  1. RuntimeImage (cluster-scoped): The platform team approves a digest-pinned runtime image (for example, java-21 or python-3.13) along with mandatory non-root UID/GID settings.
  2. NodeProfile**:** Assigns approved runtime IDs to a named node pool. A privileged provisioner DaemonSet installs the Brewlet shim, updates /etc/containerd/config.toml, restarts containerd, and stages runtime roots under /opt/brewlet.
  3. Your Deployment**:** A standard Kubernetes Deployment with runtimeClassName: brewlet and a per-container annotation (runtime-image.brewlet.sh/<container>) that selects the runtime ID.

When I first tested Brewlet v0.7.1 in October 2026, it was Java-only, configured via Helm values, and ran containers as uid=0. By v0.13.1 (November 2026), it evolved into a language-neutral platform with first-class CRDs, mandatory non-root execution, zero-setuid runtime scanning, and generation-tracked rotations.

At container creation, containerd invokes containerd-shim-brewlet-v2. The shim validates the app artifact, leases the approved runtime generation, composes a three-layer read-only OverlayFS root filesystem, and hands off to runc. Inspecting /proc/<pid>/mountinfo on a live GKE Ubuntu node shows the exact stack:

+-----------------------------------------------------------------------+
| Container Root Filesystem (OverlayFS, read-only) |
|  |
| Top:    /var/lib/brewlet/layers/<hash>/rootfs |
| (deduplicated app payload, confined to /app, ro,nosuid,nodev) |
|  |
| Middle: .brewlet-app-boundary-<id> |
| (barrier preventing app files from shadowing runtime paths) |
|  |
| Bottom: /opt/brewlet/runtimes/java-21/<inventoryUID>/<gen>/rootfs |
| (shared node-resident runtime root, unpacked once per node) |
+-----------------------------------------------------------------------+

Containers that do not set runtimeClassName: brewlet keep standard OCI behavior.

Step-by-step walkthrough on GKE Standard (Brewlet v0.13.1)

Every command in this section ran live against GKE v1.36.4-gke.2377000 (Ubuntu 24.04.5 LTS, kernel 6.8.0-1064-gke) and Brewlet v0.13.1.

1. Create the cluster and Artifact Registry

Create a GKE Standard cluster with an Ubuntu node pool and a regional Artifact Registry repository:

export PROJECT_ID=$(gcloud config get-value project)
export REGION=INSERT_REGION
export ZONE=INSERT_ZONE
export CLUSTER=brewlet-standard
export REPO=brewlet
gcloud container clusters create $CLUSTER \
  --zone $ZONE \
  --project $PROJECT_ID \
  --image-type UBUNTU_CONTAINERD \
  --machine-type e2-standard-4 \
  --num-nodes 2kubectl get nodes -o wide

Confirm that the CONTAINER-RUNTIME column reports containerd://2.x (for example, containerd://2.2.7).

Next, create the Artifact Registry repository and grant your node service account read access if needed:

gcloud artifacts repositories create $REPO \
  --repository-format docker \
  --location $REGION
PROJECT_NUMBER=$(gcloud projects describe $PROJECT_ID \
  --format='value(projectNumber)')gcloud artifacts repositories add-iam-policy-binding $REPO \
  --location $REGION \
  --member serviceAccount:${PROJECT_NUMBER}-compute@developer.gserviceaccount.com \
  --role roles/artifactregistry.reader

2. Install the Brewlet CLI and control plane

Install the brewlet CLI and deploy the v0.13.1 Helm chart:

curl -fsSL https://brewlet.sh/install.sh | \
  sh -s -- --version latest --install-dir "$HOME/.local/bin"
brewlet version
helm upgrade --install brewlet oci://ghcr.io/microsoft/charts/brewlet \
  --version 0.13.1 \
  --namespace brewlet \
  --create-namespace \
  --set dashboard.enabled=true \
  --wait --timeout 5m

This deploys brewlet-operator and brewlet-admission, registers three CRDs (runtimeimages, nodeprofiles, noderetirementevidences), and creates RuntimeClass/brewlet with overhead.podFixed: { cpu: 50m, memory: 64Mi }. No nodes are modified yet.

Google Distroless Java 21 (gcr.io/distroless/java21-debian12:nonroot) contains no shell and no setuid binaries, so it passes Brewlet’s strict non-root and zero-setuid runtime checks. Register it and create the NodeProfile:

brewlet k8s runtime add java-21 \
  --image gcr.io/distroless/java21-debian12:nonroot \
  --uid 1000 --gid 1000 \
  --ecosystem java \
  --description "Google Distroless Java 21"
brewlet k8s profile create ubuntu-workers \
  --pool default-pool \
  --runtime java-21

In my test run, each Ubuntu node pulled the 63.2 MB Distroless JRE in 6.97s and finished full staging and containerd restart in 15.79s. Verify the cluster state with brewlet k8s doctor:

STATUS  CHECK                                              MESSAGE
OK      deployment/brewlet-operator                        1/1 replicas available
OK      deployment/brewlet-admission                       1/1 replicas available
OK      daemonset/brewlet-node-provisioner-ubuntu-workers  2/2 worker pods ready
OK      runtimeclass/brewlet                               handler brewlet
OK      runtimeimage/java-21                               Approved, generation 1, 7e37784d94dc
OK      nodeprofile/ubuntu-workers                         AllNodesProvisioned
OK      nodes                                              2 node(s) labeled brewlet.sh/runtime=ready

You can also optionally open the built-in dashboard:

brewlet k8s dashboard

3. Package and push a 6.16 KiB Java app with no base image

I compiled the dependency-free Java 21 HTTP server (Hello.java) from Brewlet’s test fixtures into a 5,075-byte ./app/app.jar:

mkdir -p ./app /tmp/demo-classes
curl -fsSL \
  https://raw.githubusercontent.com/microsoft/brewlet/v0.7.1/integration-tests/fixtures/demo-app/src/com/example/Hello.java \
  -o /tmp/Hello.java
javac --release 21 -d /tmp/demo-classes /tmp/Hello.java
jar --create --file ./app/app.jar --main-class com.example.Hello \
  -C /tmp/demo-classes .

Instead of a Dockerfile, write a launch.json file (note that v0.13.1 uses process.entrypoint):

{
  "schemaVersion": 1,
  "process": {
    "entrypoint": ["java"],
    "args": ["-jar", "/app/app.jar"],
    "workingDir": "/app"
  }
}

Build a multi-architecture OCI layout locally without a Docker daemon, then push it to Artifact Registry using a short-lived gcloud access token:

export IMAGE=$REGION-docker.pkg.dev/$PROJECT_ID/$REPO/hello:2.0.0
brewlet build $IMAGE \
  --platform linux/amd64 \
  --platform linux/arm64 \
  --launch ./launch.json \
  --layer ./app:/appBREWLET_REGISTRY_USERNAME=oauth2accesstoken \
BREWLET_REGISTRY_PASSWORD="$(gcloud auth print-access-token)" \
brewlet push $IMAGE

The build took 0.77s and the push took 1.74s. The resulting multi-arch OCI image consists of a 491 B index, a 5.0 KiB app layer, and a 199 B launch layer. No base image, no OS userland, and no JVM inside the artifact.

4. Deploy and inspect kernel-level isolation

Deploy the digest-pinned image with runtimeClassName: brewlet and the runtime-image.brewlet.sh/app: “java-21” annotation. The annotation suffix (app) must match the container name:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: demo-java
spec:
  replicas: 2
  selector:
    matchLabels:
      app: demo-java
  template:
    metadata:
      labels:
        app: demo-java
      annotations:
        runtime-image.brewlet.sh/app: "java-21"
    spec:
      runtimeClassName: brewlet
      containers:
        - name: app
          image: $REGION-docker.pkg.dev/$PROJECT_ID/$REPO/hello@sha256:$DIGEST
          ports:
            - containerPort: 8080
          resources:
            requests:
              cpu: "250m"
              memory: "128Mi"
            limits:
              cpu: "1"
              memory: "512Mi"
          readinessProbe:
            httpGet:
              path: /healthz
              port: 8080

Save that manifest as deployment.yaml, replace the REGION, PROJECT_ID, and DIGEST placeholders, then apply it and forward port 8080 to query /info:

kubectl apply -f deployment.yaml
kubectl rollout status deployment/demo-java --timeout=5m
kubectl port-forward deployment/demo-java 18080:8080

In another terminal, query /info on the running pod:

curl http://127.0.0.1:18080/info

The endpoint returns the runtime version, non-root UID, and cgroup-aware JVM settings:

java.version       = 21.0.10
java.vendor        = Eclipse Adoptium
process.uid        = 1000
process.gid        = 1000
availableProcessors= 1   (cgroup/JVM aware)
Runtime.maxMemory  = 123 MB (driven by -XX:MaxRAMPercentage)

Notice what I did not write in the Deployment YAML: there is no securityContext and no nodeSelector. Brewlet’s admission webhook injected all of them automatically:

  • runAsNonRoot: true, runAsUser: 1000, runAsGroup: 1000
  • readOnlyRootFilesystem: true, allowPrivilegeEscalation: false, capabilities.drop: [“ALL”]
  • nodeSelector and nodeAffinity targeting nodes where java-21 is ready

Inspecting /proc/<pid>/status on the host confirmed CapEff: 0000000000000000 and NoNewPrivs: 1. Trying to deploy a pod requesting an unapproved runtime (java-17) was blocked at admission with UnknownRuntimeImage.

5. Rotate the runtime without rebuilding the app

When a new Java 21 patch release ships, the platform team rotates the RuntimeImage digest behind the existing java-21 ID:

brewlet k8s runtime rotate java-21 \
  --image gcr.io/distroless/java21-debian13@sha256:128bd878463537eef7771b50fecf68faace9089f654a2d233f1c4f344e6817d9 \
  --yes

Each Ubuntu node validates and stages the new generation (generation 1 -> 2). Running Pods keep the generation they started with, while new containers lease the new one. Roll the Deployment to pick up the patched JVM:

kubectl rollout restart deployment/demo-java
kubectl rollout status deployment/demo-java

The application image digest never changes. Zero CI rebuilds and zero registry pushes. If you want Brewlet to drive those rollouts automatically, enable operator.rotationRestarts.enabled in the Helm chart and add brewlet.sh/restart-on-rotation: “true” to your Deployment (see rotation and cleanup).

Treat each runtime ID as a compatibility contract: rotate patch releases behind java-21, and create a new ID for major upgrades like java-25.

Head-to-head benchmark on GKE: Brewlet vs. Distroless vs. Temurin

Claims about container size and startup speed need real numbers, not hand-waving. To avoid a strawman baseline, I added a second identical Ubuntu node pool (baseline-pool, 2x e2-standard-4, Ubuntu 24.04.5 LTS, kernel 6.8.0-1064-gke, containerd://2.2.7) to the same GKE 1.36.4 cluster.

I packaged the exact same 5,075-byte app.jar three ways and pushed all images to the same regional Artifact Registry:

  1. Brewlet: Packaged with brewlet build, running on node-resident gcr.io/distroless/java21-debian12:nonroot.
  2. Standard Distroless: Built FROM gcr.io/distroless/java21-debian12:nonroot (identical OpenJDK 21.0.10, identical Debian 12 libraries, identical hardening).
  3. Standard Temurin: Built FROM eclipse-temurin:21-jre with USER 1000:1000 (what many enterprise Java teams ship today).

All pods used identical resource limits (250m/1 CPU, 128Mi/512Mi RAM), identical security contexts, and a 1s readiness probe interval.

Image size and build footprint

• Brewlet: 6.16 KiB compressed (2 layers: app + launch), 5,075 B JAR — 1x baseline
• Standard Distroless: 61.15 MiB compressed (32 layers), 5,075 B JAR — 10,171x larger
• Standard Temurin: 114.61 MiB compressed (8 layers), 5,075 B JAR — 19,063x larger

Brewlet moves the 63.2 MB compressed (217 MB unpacked) Distroless JRE out of every app image and installs it once per node under /opt/brewlet.

Cold pull, cold startup, and warm update latency

Before each of the three cold trials, I purged the target image from the node with crictl rmi and crictl rmi –prune (and cleared /var/lib/brewlet/layers/* while keeping the pre-provisioned runtime in /opt/brewlet).

• Cold image pull (kubelet): Brewlet 1.040s | Distroless 4.677s | Temurin 7.187s (Brewlet is 4.5x faster than Distroless, 6.9x faster than Temurin)
• Cold Pod Ready (/healthz 200): Brewlet 5.430s | Distroless 7.086s | Temurin 10.109s (Brewlet is 23% faster than Distroless, 46% faster than Temurin)
• Warm cached start (0s pull): Brewlet 2.675s | Distroless 2.566s | Temurin 2.555s (Brewlet shim adds ~110 ms / +4.2% over raw runc)
• Warm app update (v1 -> v2): Brewlet 0.943s pull (3.806s Ready) | Distroless 0.946s pull (3.248s Ready) | Temurin 0.847s pull (2.991s Ready) — tied once base layers are cached

Note the following:

  • Why cold Ready was 1.66s faster instead of 3.6s faster: Because I purged /var/lib/brewlet/layers/* before each cold trial, Brewlet spent ~2s on first-time app layer validation and extraction. On warm nodes with the app layer cached, startup dropped to 2.675s.
  • Warm app updates are a tie: Once a node already caches your Distroless or Temurin base layers, standard OCI layering pulls a tiny app-only v1 -> v2 delta in ~0.85s–0.95s, matching Brewlet.

Memory sharing and shim overhead (5 pods per node)

I pinned 5 replicas of each variant to its own Ubuntu node, warmed them with HTTP requests, and measured /proc/<pid>/smaps_rollup and libjvm.so inodes.

• Brewlet: 45.9 MiB RSS | 28.8 MiB PSS | 21.5 MiB Shared_Clean (all 5 pods share libjvm.so inode 1328302)
• Standard Distroless: 46.8 MiB RSS | 29.7 MiB PSS | 21.6 MiB Shared_Clean (all 5 pods share libjvm.so inode 1575649)
• Standard Temurin: 47.4 MiB RSS | 29.5 MiB PSS | 22.5 MiB Shared_Clean (all 5 pods share libjvm.so inode 1582572)

For 5 replicas of the same image, standard containerd OverlayFS already shares the libjvm.so inode and Linux page cache across pods. All three variants landed within 1 MiB of each other in Proportional Set Size (PSS).

Where Brewlet actually wins on memory and disk density is heterogeneous microservices on the same node. In real organizations where Service A uses temurin:21.0.5-jammy, Service B uses temurin:21.0.10-noble, and Service C uses distroless/java21, containerd cannot share inodes across divergent base images. Brewlet forces every service selecting java-21 onto the exact same /opt/brewlet/runtimes/java-21/…/rootfs inode.

Here is the cost per pod:

• Measured shim RSS: 23.5 MiB (Brewlet) vs. 12.4 MiB (runc) — +11.1 MiB
• Measured shim PSS: 9.8 MiB (Brewlet) vs. 5.6 MiB (runc) — +4.2 MiB actual RAM per pod
• Default RuntimeClass podFixed overhead: 50m CPU / 64 MiB RAM (Brewlet) vs. 0m / 0 MiB (runc) — reserves ~6.5x actual shim PSS

Actual shim memory overhead is modest (+4.2 MiB PSS per pod), but the default Helm chart reserves 64 MiB of scheduler overhead per pod. On dense clusters, tune overhead.podFixed after measuring your own workloads.

Autoscaling and clean up on GKE

Brewlet uses a startup taint (startup-taint.cluster-autoscaler.kubernetes.io/brewlet=provisioning:NoSchedule) to fence new nodes until the runtime is staged. Brewlet’s providers page documents EKS, Karpenter, and AKS, but not GKE yet, and scale-from-zero is unverified across providers. If you test cluster autoscaling on GKE, pass that taint via –node-taints, add a matching –toleration to your NodeProfile, and keep the pool’s minimum size at 1 or higher until you verify fencing end to end.

When tearing down your test cluster, delete resources in order so Brewlet can cleanly revert /etc/containerd/config.toml on each node. Do not force-delete finalizers:

kubectl delete deployment demo-java
kubectl delete nodeprofile ubuntu-workers
kubectl delete runtimeimage java-21
helm uninstall brewlet --namespace brewlet --wait
gcloud container clusters delete $CLUSTER --zone $ZONE

Should you use Brewlet?

Brewlet is worth evaluating if you operate dozens or hundreds of microservices sharing common language runtimes (Java, Python, Node.js, .NET) and want your platform team to own runtime approval, CVE rotation, and non-root enforcement at container start. It does not create a stronger isolation boundary (it still hands off to runc), and it requires a privileged host-mutating DaemonSet.

If your primary goal is decoupling app code from base runtimes without custom node integration, Kubernetes image volumes are now stable and worth comparing. The Brewlet team published a fair comparison of both approaches.