Skip to content
Least Privilege Principle

Least privilege for GKE means Kubernetes RBAC inside clusters and IAM roles only for cluster management

GKE access is checked by IAM at the project level and by Kubernetes RBAC at cluster and namespace level. Google's documentation, read 16 Nov 2026, says an entity needs enough of both, and names the Kubernetes Engine Default Node Service Account role as the least privilege role for nodes.

Open the calculator ยท All services

GKE combines IAM at project level with Kubernetes RBAC at cluster and namespace level

Google's documentation says RBAC controls access on a cluster and namespace level, while IAM works on the project level, and that an entity must have sufficient RBAC and IAM permissions to work with resources in a cluster.

Predefined GKE roles include Kubernetes Engine Admin (roles/container.admin), Kubernetes Engine Developer (roles/container.developer), Kubernetes Engine Viewer (roles/container.viewer) and Kubernetes Engine Cluster Viewer (roles/container.clusterViewer). The last gets and lists clusters and includes container.clusters.connect.

Nodes run as a service account. Google documents roles/container.defaultNodeServiceAccount as the least privilege role to use as the default service account for GKE nodes.

The identities that call this service (people, services, workloads, third parties) are covered in the Google Cloud service identities guide and the workload identities guide.

Roles to avoid, with the documented reason

Four patterns widen access more than a task needs.

  • Kubernetes Engine Admin: Google's description is full management of clusters and their Kubernetes API objects. It is a project-level role, so it covers every cluster in the project.
  • Kubernetes Engine Developer at project level: Google describes access to Kubernetes API objects inside clusters, which is a long list of container.* permissions for all clusters in the project.
  • Setting a node service account: Google says you must also have the Service Account User role (roles/iam.serviceAccountUser) on the user-managed service account the nodes will use. Treat that grant as a way to act as the account.
  • Basic roles on the project: Google says they are highly permissive and should be avoided in production unless there is no alternative.

A minimal binding for a developer who connects to clusters

Google's role listing offers a connect-only role. Pair it with a namespace-scoped Kubernetes RBAC binding so that IAM stays narrow and the real permissions are set where Kubernetes enforces them.

LayerRoleWhat Google says it provides
IAM, projectroles/container.clusterViewerGet and list GKE clusters; includes container.clusters.connect
IAM, projectroles/container.viewerRead-only access to resources in clusters, such as nodes, pods and GKE API objects
IAM, projectroles/container.developerAccess to Kubernetes API objects inside clusters
Kubernetes RBACA Role and RoleBinding in one namespaceSet per namespace by the cluster owner

RBAC, Google Groups and node account choice narrow access

Google's documentation has a section on authorizing actions in clusters with GKE RBAC and one on managing permissions for groups using Google Groups with RBAC. Binding groups, rather than individuals, makes a leaver's access disappear with one membership change.

Use the Default Node Service Account role for nodes and grant extra access to workloads through separate identities, not through the node account, since every pod on the node shares that account.

Checking what is used

The IAM recommender flags excess permissions on IAM roles using the last 90 days of usage, per Google's documentation. It covers the project-level GKE roles above and the roles of the node service accounts.

For Kubernetes RBAC, list RoleBindings and ClusterRoleBindings per namespace and compare them with the groups that actually deploy. Remove cluster-wide bindings that exist for one namespace.

Sources

  1. GKE IAM roles, read 16 Nov 2026
  2. IAM roles overview, read 16 Nov 2026
  3. Role recommendations overview, read 16 Nov 2026

Last reviewed 16 Nov 2026.