Google Associate Cloud Engineer Question 196
Select 4Google Cloud PlatformYou are a Google Certified Associate Cloud Engineer tasked with setting up a Google Kubernetes Engine (GKE) cluster to pull container images from a private Google Artifact Registry. What steps do you need to ensure that your GKE nodes can authenticate and pull images from Artifact Registry?
- A
Grant the Artifact Registry Reader role to the GKE default service account.
- B
Enable the Artifact Registry API in your Google Cloud project.
- C
Create a Docker configuration file with Artifact Registry credentials and manually distribute it to each node.
- D
Configure GKE to automatically use Google service accounts to authenticate with Artifact Registry.
- E
Use a custom service account with the necessary permissions during cluster creation.
Show answer and explanation
Correct answers: A, B, D, E
Explanation
To configure a GKE cluster to pull images from a private Google Artifact Registry, you must ensure that your cluster nodes have the necessary permissions to access the registry. This involves granting the appropriate role to the service account used by the nodes, enabling the necessary APIs, and ensuring the cluster is set up to use Google service accounts for authentication. Using custom service accounts during cluster creation can also provide more granular access control.
- A. Correct.
Granting the Artifact Registry Reader role to the GKE default service account allows it to access images stored in the registry.
- B. Correct.
The Artifact Registry API must be enabled in your project to allow integration and access.
- C. Incorrect.
Manually distributing Docker configuration files is not the recommended approach as GKE can handle authentication using service accounts.
- D. Correct.
Configuring GKE to use Google service accounts ensures that nodes can authenticate with Artifact Registry without manual intervention.
- E. Correct.
Using a custom service account with necessary permissions is a secure practice to ensure access control and auditability.