Google Kubernetes Engine can pull images directly from Docker repositories. Some versions include pre-configured support for pulling images from Artifact Registry Docker repositories.
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|
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
- LOCATION is the regional or multi-regional location of the repository.
- PROJECT is your Google Cloud Console
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.