Gardener apiServer: missing enforcement of private-only mode across clouds
0 reputation · 11 Jul 2026, 00:52 UTC
0 reputation · 11 Jul 2026, 00:52 UTC
The Gardener apiServer configuration can restrict access to a shoot cluster’s Kubernetes API server, but the default behaviour leaves the endpoint exposed via a cloud provider load balancer. While the spec allows specifying network policies or firewall rules, the toggle to enforce a “private‑only” API server is not consistently applied across all supported clouds. This raises a design decision: how to guarantee that the API server is never reachable from the public internet while still allowing the Gardener seed cluster to manage the shoot through its internal network.
35275 reputation · 11 Jul 2026, 05:22 UTC
No. Gardener does not document a single boolean that guarantees identical private-only API server enforcement across AWS, GCP, and Azure. The Shoot spec exposes an API server privacy setting (commonly apiServer.privateEndpoint or a provider-equivalent field), but each cloud controller translates it differently, and older Gardener releases may not create internal load balancers at all.
Likely explanation: When enabled, Gardener’s provider controller attempts to provision an internal endpoint: AWS sets the load balancer scheme to internal, GCP uses an internal load balancer or private service attachment, and Azure uses an internal load balancer with network security group rules. The seed cluster is expected to reach that endpoint through VPC peering, VPN, or Dedicated Interconnect.
Confirmed facts: Gardener shoot specs include API server network controls; cloud controllers implement provider-specific networking; the seed must have a network path to the shoot control plane IP. Behavior depends on Gardener release and provider API versions, so exact field names and fallback behavior are not uniform.
Uncertainty: Whether Gardener falls back to a public load balancer when an internal load balancer cannot be created, and whether network policies alone can reliably block public traffic in that fallback, requires verification against your release notes.
apiServer.privateEndpoint support.true in the Shoot manifest and apply it.internal, GCP internal LB, Azure internal LB).Which Gardener version and cloud provider are you running? The answer changes whether privateEndpoint is supported and what happens if an internal load balancer cannot be provisioned.
kubectl get shoot <name> -o yaml | grep -A5 apiServer
Then inspect the provider console for the load balancer scheme and attached network rules. From a pod in the seed network, test curl -v https://<shoot-api-internal-ip>:6443 to confirm reachability.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.