IP allowlist playbook
IP allowlist for the Kubernetes API
Restrict the EKS, GKE and AKS API server to your team’s IPs, also called an IP whitelist for kubectl.
A managed Kubernetes cluster’s API server is open to the whole internet by default. All three big clouds let you narrow it to a list of addresses on every plan, and it is one of the highest-value lines of config a small team can add.
Vendor facts checked on .
What this control covers
- Connections to the cluster’s public API endpoint:
kubectl, Helm, Terraform and CI deploys. - EKS public access CIDRs, GKE authorized networks and AKS authorized IP ranges.
What it doesn’t cover
- Who may do what once connected: keep OIDC sign-in and RBAC.
- The private endpoint on EKS, which the cluster security group controls instead.
- Traffic to your workloads through load balancers and ingresses: those need their own rules.
The plan you need
Every plan on all three clouds. The limits differ: EKS takes 40 CIDR ranges per cluster, and the quota can’t be raised; GKE takes up to 100 authorized networks (50 on some clusters created before version 1.29); AKS takes 200 ranges, and doesn’t offer the feature on private clusters. AWS: Amazon EKS endpoints and quotas.
Why an allowlist needs fixed IPs
An IP allowlist is only as good as the addresses on it. Home and mobile IPs change without notice, so a list of your team’s own addresses locks people out every few weeks, and someone ends up adding a broad range or switching the control off.
A shared VPN looks like a fix, but its exit IP belongs to every customer of that VPN server. Allowlisting it lets them in too.
What works is a small set of addresses that belong to your team alone and don’t change: your team’s traffic to the service leaves from them, and nothing else does.
Set it up
EKS: turn on the private endpoint and set public access CIDRs
By default the public endpoint accepts
0.0.0.0/0. With the private endpoint on, nodes stay inside the VPC and only people and CI use the public one.shell aws eks update-cluster-config --name my-cluster \ --resources-vpc-config endpointPublicAccess=true,publicAccessCidrs="203.0.113.10/32,203.0.113.11/32",endpointPrivateAccess=trueEKS in Terraform
In
aws_eks_cluster,public_access_cidrsdefaults to["0.0.0.0/0"]andendpoint_private_accessto false; set both.eks.tf vpc_config { subnet_ids = var.subnet_ids endpoint_private_access = true endpoint_public_access = true public_access_cidrs = ["203.0.113.10/32", "203.0.113.11/32"] }GKE: enable authorized networks
Google now calls this the IP-based endpoint; authorized networks are IPv4 only. Until you set them, the control plane accepts any external IP. Pass every range you want each time.
shell gcloud container clusters update my-cluster --location europe-west1 \ --enable-master-authorized-networks \ --master-authorized-networks 203.0.113.10/32,203.0.113.11/32GKE: decide about Google Cloud addresses
Separately from your list, Google Cloud’s own external IPs can reach the control plane.
--no-enable-google-cloud-accessdenies them; Google notes the change might take several hours. If you use Google’s DNS-based endpoint, IAM controls it, not this list.GKE in Terraform
In
google_container_cluster:gke.tf master_authorized_networks_config { cidr_blocks { cidr_block = "203.0.113.10/32" display_name = "gate-1" } cidr_blocks { cidr_block = "203.0.113.11/32" display_name = "gate-2" } }AKS: set authorized IP ranges
The command replaces the current list, so include everything, and check the result. Microsoft recommends also listing the cluster’s own egress IP if it leaves through a firewall or NAT gateway. Changes take up to two minutes.
shell az aks update -g my-rg -n my-aks \ --api-server-authorized-ip-ranges 203.0.113.10/32,203.0.113.11/32 az aks show -g my-rg -n my-aks --query apiServerAccessProfile.authorizedIpRangesAKS in Terraform
In
azurerm_kubernetes_cluster:aks.tf api_server_access_profile { authorized_ip_ranges = ["203.0.113.10/32", "203.0.113.11/32"] }
Check that it works
From an allowed IP, kubectl works
With your traffic leaving from a listed address,
kubectl get nodesshould answer as before, and every node should beReady.From anywhere else, it times out
From a network that isn’t on the list,
kubectl get nodes --request-timeout=10sshould fail to connect. A timeout, not an authorization error, means the network rule is what stopped you.Run one CI deploy
Trigger a deploy from your pipeline. If it can’t reach the API, its runners are calling from addresses you haven’t listed; see the FAQ.
Where the fixed IPs come from
Teicho sends your team’s traffic to the service through a pair of Gates dedicated to your team, each with a fixed IP. Allowlist both, and the service sees only your people and machines, each signed in as themselves, while everyday browsing still goes straight to the internet. Teicho is in early access.
FAQ
Questions
Is this the same as an IP whitelist for kubectl?
Yes. EKS calls it public access CIDRs, GKE authorized networks and AKS authorized IP ranges; all three are allowlists of addresses that may reach the API server.
How do GitHub Actions deploy if the API is locked?
GitHub publishes hosted-runner ranges, updates them weekly and itself says not to use them as allowlists; they are also far more ranges than EKS’s 40 allow. Use larger runners with static IPs, self-hosted runners, or send the runner’s traffic through your team’s fixed IPs.
Can I allowlist IPv6 addresses?
Only partly. EKS accepts IPv6 CIDRs only on IPv6 clusters created from October 2024; GKE documents authorized networks as IPv4 only; Microsoft’s AKS page doesn’t say. Plan on IPv4.
Why not list everyone’s home IP?
EKS stops at 40 ranges, home IPs change, and every change is a cluster update. A short list of fixed team IPs doesn’t change when people move.
Wouldn’t a private-only cluster be better?
It can be, but then every person and pipeline needs a path into the VPC. The allowlist keeps the public endpoint and narrows it to your team.
Sources
- AWS: Amazon EKS cluster endpoint access
- AWS: Amazon EKS quotas
- Google Cloud: authorized networks
- Google Cloud: network isolation
- Microsoft: AKS API server authorized IP ranges
- GitHub: GitHub-hosted runners
Plans, limits and steps on this page were checked against the vendor’s documentation on 2 November 2026. Vendors change them; if something here is out of date, tell us at hello@teicho.io.
Put a wall around what matters.
Teicho is in early access. Tell us what you want to protect and we’ll be in touch.