Skip to main content

More Info:

Create clusters with private nodes so nodes have only internal IP addresses and are not directly reachable from the internet. This reduces the node attack surface.

Risk Level

High

Address

Security

Compliance Standards

  • CIS GKE

Triage and Remediation

Remediation

Manual Steps

  1. Identify clusters without private nodes
    • Run on: any machine with gcloud access.
    • Note clusters where privateClusterConfig.enablePrivateNodes is empty or false.
  2. Assess exposure and necessity of public nodes
    • For each non-private cluster from step 1, review:
      • Whether workloads require direct node access from the internet.
      • Whether connectivity can be provided via load balancers, Ingress, VPN, or Cloud Interconnect instead of public node IPs.
    • Document clusters where private nodes are feasible and desirable.
  3. Check use of IP aliases and master CIDR (for planning migration)
    • Run on: any machine with gcloud access.
    • If useIpAliases is not True, note that the cluster cannot simply be flipped to private nodes; a new cluster will be required to meet the remediation.
  4. Decide remediation approach per cluster
    • If the cluster already has useIpAliases=True and your networking design allows it, plan to recreate the cluster with --enable-private-nodes (GKE does not support toggling this on an existing non-private cluster).
    • If useIpAliases=False, plan a migration to a new cluster that meets all three flags: --enable-private-nodes, --enable-ip-alias, and --master-ipv4-cidr.
  5. Create a compliant replacement cluster
    • Run on: any machine with gcloud access. Choose appropriate ranges for your environment.
    • Migrate workloads (namespaces, workloads, services, ingress, and associated IAM, firewall, and networking rules) from the old cluster to the new private one, then decommission the old cluster.
  6. Verify remediation
    • Run on: any machine with gcloud access.
    • Confirm that enablePrivateNodes is true, useIpAliases is true, and masterIpv4CidrBlock is set.
kubectl cannot enable private nodes or change GKE cluster networking; this configuration is managed at the cloud provider control-plane level via gcloud, the GCP console, or IaC. Refer to the Manual Steps section for how to review the current cluster and recreate or reconfigure it with private nodes enabled.
Explanation of output indicating a problem:
  • Any cluster row with:
    • PRIVATE column showing false, or
    • NOTE column containing NOT PRIVATE (finding)
indicates a non-compliant cluster for this control (nodes are not configured as private). Use this list as input to manual redesign/recreation/migration decisions; enabling private nodes on an existing non-private cluster is not a deterministic one-shot fix.