GKE Autopilot rejected the workload: resources adjusted / violates Autopilot constraints

Autopilot modifies or rejects pods that don't meet its rules (requests/limits, privileged settings, host access).

Exact message you may see GKE Autopilot resources adjustedAutopilot mutated the podWorkload violates Autopilot constraintsadmission webhook "warden-validating.common-webhooks.networking.gke.io" denied the request
Seen on: Google Cloud Kubernetes

Meaning

Set CPU/memory requests (limits equal requests in Autopilot), avoid privileged containers, hostPath/hostNetwork and unsupported node selectors, and read the admission warning in the Pod annotations. Warden messages explain what was changed.

Common causes

  • Missing or unbalanced requests/limits
  • Privileged or hostPath usage
  • Unsupported capabilities/sysctls
  • GPU/spot selectors misconfigured
  • DaemonSet needing node access

⚡ Quick fix

  1. Define CPU/memory requests (limits = requests)
  2. Remove privileged/hostPath settings
  3. Check the autopilot.gke.io/resource-adjustment annotation

Detailed fix by platform

Shell

  1. bash
    kubectl get pod POD -o jsonpath="{.metadata.annotations}"
    kubectl describe pod POD | grep -i autopilot

How to diagnose

  1. Requests — Set?
  2. Privileged — Used?
  3. Annotation — Shows changes?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

2627 — SQL Server: Violation of PRIMARY KEY constraint 'x'. Cannot insert duplicate key in object 'y'. (Msg 2627) (SQL)2627515 — SQL Server Msg 515: Cannot insert the value NULL into column 'X', table 'Y'; column does not allow nulls (SQL)515admission webhook — GKE private cluster: failed calling admission webhook — context deadline exceeded (control plane can't reach webhook port) (Google Cloud / Firebase)admission webhookadmission webhook denied the request — Error from server: admission webhook "validate.nginx.ingress.kubernetes.io" denied the request (Kubernetes)admission webhook den…E11000 duplicate key — MongoServerError: E11000 duplicate key error collection: db.users index: email_1 dup key (Node.js)E11000 duplicate keyfailed calling webhook — Internal error occurred: failed calling webhook "x": ... connection refused / context deadline exceeded (Kubernetes)failed calling webhookFailedScheduling — Kubernetes: Pod stuck in Pending — FailedScheduling: 0/3 nodes are available (Kubernetes)FailedSchedulingforeign key order — Foreign key violation caused by insert order or circular references (SQL)foreign key orderAutopilot

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.