More Info:

Configure the Cluster Service Account with Storage Object Viewer Role to only allow readonly access to GCR.

Risk Level

Medium

Address

Security, Reliability, Best Practice

Compliance Standards

CISGKE

Triage and Remediation

Remediation

To minimize cluster access to read-only for GCR in GCP, you can follow the below steps:

  1. Open the Google Cloud Console and select the GKE cluster for which you want to minimize the access.

  2. Click on the “Edit” button for the cluster.

  3. Scroll down to the “Security” section and click on “Add item” under the “Container Registry” subsection.

  4. In the “Add members” field, enter the email addresses of the users or service accounts that you want to grant read-only access to.

  5. In the “Role” field, select “Storage Object Viewer” from the dropdown menu.

  6. Click on the “Save” button to save the changes.

  7. Repeat steps 4-6 for each user or service account that you want to grant read-only access to.

  8. Once you have added all the users or service accounts, click on the “Save” button to save the changes to the cluster.

By following these steps, you will be able to minimize the cluster access to read-only for GCR in GCP using the GCP console.

Additional Reading: