Cloud SQL private IP: allocated IP range is exhausted / private services access not configured

Creating a private-IP instance fails because the VPC peering range is missing, too small or conflicts.

Exact message you may see Cloud SQL private IP allocated range exhaustedPrivate service access not configuredAn allocated IP range was exhaustedFailed to create subnetwork. Couldn't find free blocks in allocated IP rangesservicenetworking.googleapis.com peering
Seen on: Google Cloud

Meaning

Reserve an IP range for private services access (gcloud compute addresses create --purpose=VPC_PEERING --prefix-length=16) and create the peering (gcloud services vpc-peerings connect). Increase or add ranges if full; ensure ranges don't overlap with on-prem or other peerings.

Common causes

  • No private services access configured
  • Allocated range too small or used up
  • Overlapping ranges
  • Peering deleted by mistake
  • Org policy blocking peering

⚡ Quick fix

  1. Allocate a /16 range and create the VPC peering
  2. Add another allocated range if exhausted
  3. Resolve overlaps

Detailed fix by platform

Shell

  1. bash
    gcloud compute addresses create google-managed-services --global --purpose=VPC_PEERING --prefix-length=16 --network=NET
    gcloud services vpc-peerings connect --service=servicenetworking.googleapis.com --ranges=google-managed-services --network=NET

How to diagnose

  1. Range — Allocated?
  2. Peering — Active?
  3. Overlap — None?

🔧 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):

CannotPullContainerError — ECS task stopped: CannotPullContainerError: pull image manifest has been retried ... / ref pull has been retried (AWS)CannotPullContainerEr…Cloud NAT — Cloud NAT: OUT_OF_RESOURCES dropped connections (port exhaustion) (Google Cloud / Firebase)Cloud NATCloud SQL: failed to connect to instance — Cloud SQL: failed to connect to `host=PROJECT:REGION:INSTANCE user=app database=db`: dial error (timeout) / Cloud SQL Auth Proxy: failed to connect to instance (Google Cloud / Firebase)Cloud SQL: failed to …database flags — Cloud SQL: invalid database flag value / instance fails to restart after a flag change (Google Cloud / Firebase)database flagsdefault backend - 404 — Ingress returns "404 Not Found" / "default backend - 404" (ingress-nginx) (Kubernetes)default backend - 404FailedCreatePodSandBox — Failed to create pod sandbox: plugin type="calico" failed (add): ... (FailedCreatePodSandBox) (Kubernetes)FailedCreatePodSandBoxIP_SPACE_EXHAUSTED — GKE: IP_SPACE_EXHAUSTED — pods can't be scheduled (Pod CIDR or subnet range full) (Google Cloud / Firebase)IP_SPACE_EXHAUSTEDiptables: No chain/target/match — driver failed programming external connectivity on endpoint: iptables: No chain/target/match by that name (Docker)iptables: No chain/ta…private IP

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.