Skip to main content

More Info:

Run node pools with a dedicated, minimally privileged service account instead of the Compute Engine default account, which has broad project permissions. This reduces the privileges available if a node is compromised.

Risk Level

Medium

Address

Security

Compliance Standards

  • CIS GKE

Triage and Remediation

Remediation

Manual Steps

  1. Create a dedicated GKE node service account (run on any machine with gcloud configured for the project)
  2. Grant the required minimal roles to the node service account (same machine)
  3. Identify the cluster and node pool currently using the default service account (same machine)
  4. Create a new node pool that uses the dedicated service account (same machine)
    Choose a new node pool name, e.g. secure-pool:
    Adjust --num-nodes and other flags (machine type, autoscaling, etc.) to match the existing pool’s requirements.
  5. Migrate workloads and delete the old node pool using the default service account (same machine)
    a. Cordon and drain nodes in the old pool so workloads move to the new pool:
    Then, from any machine with kubectl configured for the cluster:
    b. After workloads are running on the new pool, delete the old pool:
  6. Verification (same machine; confirms no node pool is using the default service account)
    Confirm that none of the listed service accounts is default.
kubectl cannot change which Google Cloud service account GKE nodes use, because this setting is defined on the managed control plane / node pool configuration in GCP (via gcloud, console, or IaC). To remediate this finding, make the changes described in the Manual Steps section using the cloud provider tools rather than kubectl.