3
votes

I'm trying to determine if Google Container Registry (GCR) can be used within the Always Free GCP tier. This tier offers free 5GB of regional storage in Google Cloud Storage (GCS). Multi-regional storage buckets are not included in the free tier.

GCR pricing is equal to the pricing of the storage used by the images. The documentation says:

The default Cloud Storage class used for most Container Registry storage buckets is called Multi-Regional.

and:

To learn more about regional locations and their Cloud Storage classes, see Bucket Locations. You can also change the bucket's class.

Both links lead to the documentation for Google Storage, not specifically for Google Container Registry. I tried to follow the instructions to change the default bucket class, but the "Regional" option is disabled.

I also tried changing the GCR domain in the image tag, with the following results:

  • gcr.io: Creates a Multi Regional bucket, unable to change to Regional
  • us.gcr.io: Same as gcr.io
  • us-east1.gcr.io: Fails with message Invalid host name us-east1.gcr.io.

I understand that in the past, it was possible to "bring your own bucket" to GCR, but that seems no longer possible.

With that all said, is it possible at all to use GCR within the Always Free tier?

1

1 Answers

3
votes

Google cloud bucket storage class can currently not be changed from REGIONAL to MULTI_REGIONAL and vice-versa. This is the case even from command line via gsutil.

Moreover, an object's storage class cannot be REGIONAL if the bucket is multi-regional, and vice-versa. However, COLDLINE and NEARLINE storage classes can be used on objects within regional and multi-regional buckets.

You can only change the storage class of an object via gsutil rewrite -s NEW_CLASS (but a bucket's storage class can be changed from either gsutil or console).

So, you should be able to create a bucket with REGIONAL class and specify it as a GCR store.