← Back to list

Running Privileged Workloads on GKE Autopilot: Introduction and Walkthrough

If you’ve been using Google Kubernetes Engine (GKE) Autopilot, you might be aware of the deployment model: Google manages the nodes…

Konrad Schieban in Google Cloud - Community · 2026-04-03 08:20 · 0 claps · 4.1 min read
#gke #gke-autopilot #google-cloud-platform #kubernetes
Open on Medium ↗
Wiki topics: ☁️ · DevOps & Cloud 🏃 · Running & Endurance

Running Privileged Workloads on GKE Autopilot: Introduction and Walkthrough

If you’ve been using Google Kubernetes Engine (GKE) Autopilot, you might be aware of the deployment model: Google manages the nodes, handles the scaling, and enforces strict, secure-by-default constraints. It’s a fantastic model for reducing operational overhead. But until recently, there has been an important constraint to keep in mind: What happens when you need to run a privileged workload?

Historically, Autopilot’s answer was a polite but firm “No.” Unless you were running an officially approved Autopilot partner workload (like specific third-party security or monitoring agents), deploying anything requiring hostNetwork, elevated capabilities (like SYS_ADMIN), or hostPID was blocked by the admission controller.

But the reality of enterprise infrastructure is that sometimes, you actually need those privileges. Whether it’s a homegrown network monitoring DaemonSet, a specialized internal security agent, or a legacy workload with deep host dependencies, those strict boundaries can become roadblocks.

Fortunately, Google Cloud recently introduced a feature that solves this: **Privileged Workload Admission in Autopilot mode **. It allows you to poke precise, highly controlled holes in Autopilot’s security constraints using a mechanism called a WorkloadAllowlist.

This blog post aims at giving you simple step-by-step instructions to test this out yourself. Note, that Privileged Workload Admission is a feature that customers need to get allowlisted for via Customer Care Center or their Google account management.

Principles of Privileged Workload Admission

At a high level, Privileged Workload Admission decouples workload approval from cluster administration by using a secure, centralized source of truth. It begins with an Organization Policy (container.managed.autopilotPrivilegedAdmission) that acts as a top-level gate, designating a specific Cloud Storage bucket as the approved location for your allowlists. Inside this bucket, administrators store WorkloadAllowlist YAML files that explicitly define the allowed workloads and operations. Back in your GKE Autopilot cluster, an Allowlist-Synchronizer continuously fetches these definitions. Finally, when a pod is deployed, the GKE Warden (the cluster's admission controller) evaluates the request against these synchronized rules, securely admitting only the workloads that perfectly match your approved definitions.

Walkthrough: Implementing Privileged Admission

For the sake of this walkthrough we’ll use a simple, generic privileged busybox Pod to clearly demonstrate the mechanics.

Setting this up involves a few preparation steps:

  1. Configuring the Organization Policy
  2. Generating the workload allowlist
  3. Uploading the allowlist to a Google Cloud Storage (GCS) bucket
  4. Synchronizing the Allowlist to the cluster.
  5. Deploying the workload

Note: This feature requires your GKE Autopilot cluster to be running version 1.35 or later.

Step 1: The Organization Policy

By default, custom allowlists are disabled globally. You have to update the container.managed.autopilotPrivilegedAdmission Organization Policy to explicitly permit allowlists from a specific source (in this case, your GCS bucket path). Here you already need to define the path where you fill place the workloadConstraint yaml file.

Step 2: Generating the Allowlist

GKE makes it relatively easy to generate the exact YAML needed for your allowlist. Instead of writing the WorkloadAllowlist Custom Resource from scratch, you can take the deployment YAML for your workload and add a specific annotation to the Pod specification:

metadata:
  annotations:
    cloud.google.com/generate-allowlist: "true"
apiVersion: apps/v1
kind: Deployment
metadata:
  name: privileged-deployment
  labels:
    app: privileged-app
spec:
  replicas: 1
  selector:
    matchLabels:
      app: privileged-app
  template:
    metadata:
      labels:
        app: privileged-app
      annotations:
        cloud.google.com/generate-allowlist: "true"
    spec:
      containers:
      - name: privileged-container
        image: busybox:latest
        command: ["sh", "-c", "while true; do sleep 3600; done"]
        securityContext:
          privileged: true # Enables privileged mode
        resources:
          limits:
            cpu: 100m
            memory: 128Mi
          requests:
            cpu: 100m
            memory: 128Mi

When you attempt to apply this to the cluster, GKE rejects the workload (as expected) but generates the exact WorkloadAllowlist YAML you need to approve it (reference). This is how it turned out for me:

apiVersion: auto.gke.io/v1
kind: WorkloadAllowlist
minGKEVersion: 1.32.0-gke.1000000
metadata:
  name: workload-allowlist
  annotations:
    autopilot.gke.io/no-connect: "true"
exemptions:
- autogke-disallow-privilege
matchingCriteria:
  containers:
  - name: privileged-container
    image: busybox:latest
    command:
      - sh
      - -c
      - while true; do sleep 3600; done
    securityContext:
      privileged: true

Step 3: Storing the Allowlist in Cloud Storage

Once the allowlist is created (let’s call it workloadAllowlist.yaml), upload it to a dedicated GCS bucket. You also need to allow the GKE Service Agent to allow the contents in the bucket (reference):

gcloud storage buckets add-iam-policy-binding gs://<bucket-name> --member=serviceAccount:service-<project-number>@container-engine-robot.iam.gserviceaccount.com --project=<project-name> --role=roles/storage.bucketViewer
gcloud storage buckets add-iam-policy-binding gs://<bucket-name> --member=serviceAccount:service-<project-number>@container-engine-robot.iam.gserviceaccount.com --project=<project-name> --role=roles/storage.objectViewer

Step 4: Configuring the AllowlistSynchronizer

Next, tell the Autopilot cluster to look for this allowlist. GKE uses an AllowlistSynchronizer custom resource for this. Every 10 minutes, the cluster reaches out to the GCS bucket, pulls down any allowlist files, and syncs them into the cluster's admission webhook. Follow the Google Docs for a full reference of this CRD.

apiVersion: auto.gke.io/v1
kind: AllowlistSynchronizer
metadata:
  name: my-allowlist-synchronizer
spec:
  projectNumber: <project-number>
  bucketName: <bucket-name>
  allowlistPaths:
  - folder/workloadAllowlist.yaml

Step 5: Deploying the Workload

Once the synchronizer pulled in the allowlist, reapply deployment.

This time, the GKE Warden admission webhook intercepted the request, compared every field of my Pod spec (the image name, the requested capabilities, the volume mounts) against the WorkloadAllowlist, found a 1:1 match, and granted admission.

If a developer later tries to sneak SYS_ADMIN into a different deployment or change the container image to an unapproved version, the admission controller will instantly reject it, throwing a clear error detailing the mismatch.

Conclusion

The “Privileged Workload Admission” feature represents a massive maturity milestone for GKE Autopilot. It acknowledges that enterprise environments may have sophisticated requirements and sometimes require deep system access (like running a service mesh CNI), but it refuses to compromise on the principle of least privilege.

By forcing administrators to define explicit allowlists synced from a central, auditable storage bucket, Google has provided a way to “break the glass” safely.

Have you run into limitations with GKE Autopilot’s security constraints? I’d love to hear how you’re handling privileged workloads in the comments!


메타데이터
post_id
5056ccc2e619
slug
running-privileged-workloads-on-gke-autopilot-introduction-and-walkthrough-5056ccc2e619
url
https://medium.com/google-cloud/running-privileged-workloads-on-gke-autopilot-introduction-and-walkthrough-5056ccc2e619
canonical_url
https://medium.com/google-cloud/running-privileged-workloads-on-gke-autopilot-introduction-and-walkthrough-5056ccc2e619
author_url
https://medium.com/@kschieban
status
ok
fetched_at
2026-06-26 12:24:55