Deploying to Google Kubernetes Engine

Google Kubernetes Engine can pull images directly from Docker repositories. Some versions include pre-configured support for pulling images from Artifact Registry Docker repositories.

Requirements

The following table lists the minimum required GKE versions to create clusters that have default permissions to pull containers from Docker repositories in the same project.

Version Minimum required patch
1.14 1.14.8-gke.37
1.14.9-gke.28
1.14.10-gke.22
1.15 1.15.7-gke.28 1.15.8-gke.6
1.15.9-gke.1
1.16 1.16.4-gke.28
1.16.5-gke.0
1.17 1.17.0-gke.5

You must configure access with Kubernetes imagePullSecrets in other cases:

  • You are not using one of the GKE versions that are configured for default pull access.
  • You need to access containers from repositories in another project.

Running an image

You can run a Artifact Registry image on a Google Kubernetes Engine cluster using the following command:

kubectl run [NAME] --image=LOCATION-docker.pkg.dev/PROJECT-ID/REPOSITORY/IMAGE:TAG

where:

  • LOCATION is the regional or multi-regional location of the repository.
  • PROJECT is your Google Cloud Console project ID. If your project ID contains a colon (:), see Domain-scoped projects.
  • REPOSITORY is the name of the repository where the image is stored.
  • IMAGE is the name of the image in the repository.
  • TAG is the tag for the image version that you want to pull.

For more information about Kubernetes commands, see Overview of kubectl.