More Info:
Create clusters with a private control plane endpoint and public access disabled so the control plane is not reachable from the public internet. A public endpoint significantly increases exposure.Risk Level
CriticalAddress
SecurityCompliance Standards
- CIS GKE
Triage and Remediation
- Remediation
Remediation
Manual Steps
Manual Steps
-
Identify and review current endpoint configuration (any machine with gcloud installed)
Review:
privateClusterConfig.enablePrivateEndpointistrue(private endpoint enabled)- Public endpoint exposure (presence of
endpoint,privateCluster: true) - Any
masterAuthorizedNetworksConfiguse, which still indicates a public control-plane endpoint.
-
Decide on remediation strategy (console/CLI/IaC review, no command)
Based on your org’s policies, decide whether to:- Replace this cluster with a new private-cluster-only control plane, or
- Accept and document the risk for this cluster (e.g., dependency on public endpoint, legacy tooling, no Private Service Connect / VPC access).
-
Plan a replacement private cluster with private endpoint only (any machine with gcloud installed)
Draft the cluster creation command ensuring private endpoint and required flags are set (do not run in production until planned and approved):Review network prerequisites (VPC, subnets, routes, firewall rules, access paths for admins/CI) before actually creating the cluster. -
If using IaC, update templates instead of ad‑hoc CLI (any IaC workstation)
- Modify Terraform/Deployment Manager/other templates so new clusters include:
enable_private_nodes = trueenable_private_endpoint = true- IP aliasing and
master_ipv4_cidr_blockset.
- Run your normal plan/review process (e.g.,
terraform plan) to confirm only the intended changes will apply, then apply in a maintenance window.
- Modify Terraform/Deployment Manager/other templates so new clusters include:
-
Migrate workloads and cut over (any machine with kubectl and gcloud)
- Export and re‑apply workloads to the new private cluster. Example to switch context:
- Reconfigure CI/CD, monitoring, and access paths to use the private endpoint (through VPC/PSC/Bastion as appropriate).
- Once validated, decommission the old cluster:
- Export and re‑apply workloads to the new private cluster. Example to switch context:
-
Verify the new cluster complies (any machine with gcloud installed)
Confirm:
privateClusterConfig.enablePrivateEndpointistrue.- The cluster is a private cluster (
privateCluster: true). - Access to the control plane is only via the private endpoint (no reliance on a public endpoint in your operational procedures).
Using kubectl
Using kubectl
kubectl cannot modify GKE control plane endpoint settings; they must be changed at the cloud provider level (gcloud/console/Terraform) where the cluster is created or updated. Refer to the Manual Steps section for the exact remediation process.
Automation
Automation
- The script prints one CSV line per cluster.
- A cluster is non-compliant and needs manual review when:
enablePrivateEndpointisfalse, orenablePrivateNodesisfalse, ormasterIpv4Cidris empty, orpublicEndpointAccessibleistrue.
enablePrivateNodes=trueenablePrivateEndpoint=truemasterIpv4Cidr= non-empty CIDRpublicEndpointAccessible=false

