How do I add private GCP Google Container Registry (GCR) images in my application?

Replicated allows for integration with the Google Container Registry (GCR) through the JSON Key authentication mechanism.

In Google Cloud Platform you must first set up a Service Account with permissions to pull from the GCR repo by giving that account the “Storage Object Viewer” role.

You can then create a JSON key from that Service Account. When prompted for key type, make sure to select “JSON” before creating. After clicking create, a JSON file will be downloaded in your browser. This file will be used in the next step.

Under your application in the Replicated Vendor Portal, you will have the option of adding external registries. Under Username you must specify “_json_key”. Use the contents of the key file, omitting line breaks, in the field Password. Email Address in this case is ignored. Please note that GCR has multiple hostnames which are not interchangeable, so be sure to add the correct one to the Endpoint field.

Once you have added GCR as an external registry you can use the image in your Kubernetes manifests.