I have a Google Kubernetes Engine cluster which until recently was happily pulling private container images from a Google Container Registry bucket. I haven\'t changed anyth
I got the same issue when I created a cluster with terraform. Firstly, I only specified service_account
in node_config
so node pool was made with too small OAuth scopes. Explicitly write both service_account
and oauth_scope
like below, nodes are able to pull images from private GCR repositories.
resource "google_container_node_pool" "primary_preemptible_nodes" {
node_config {
service_account = "${google_service_account.gke_nodes.email}"
oauth_scopes = [
"storage-ro",
"logging-write",
"monitoring"
]
}
}