Configuring container image settings

To run or debug an application on Kubernetes, you'll need to define the container image repository for your project, by configuring it in the Develop on Kubernetes and Run on Kubernetes run configurations.

Specifying where container images are stored

If you'd like to update the image repository where the project images are about to be pushed, follow these instructions:

  1. Navigate to the Run/Debug configurations dialog on the top taskbar or the top-level main menu: Run > Edit Configurations... > Develop on Kubernetes or Run on Kubernetes > Where are the container images stored?.

  2. Fill in the Where are the container images stored? field.

    Default image repository in run configuration being set with the 'gcr.io/' format and being presented autocomplete options based on current project and active cluster

    • If you are using GKE, you can store your images on Google Container Registry, using the following format:

      gcr.io/{project-name} where {project-name} is the name of your GCP project containing your cluster.

    • If you choose to store your images on Docker Hub (ensure that you are properly authenticated if you are using a private Docker Hub repository), use the following format:

      docker.io/{account} where {account} is the name of your Docker Hub account.

Image name creation

The resulting image name is concatenated from the specified default image repository and the image name from the project's Kubernetes resources. For the 'java-guestbook' example, and GCR image repository as the default one, the resulting full image name would be gcr.io/{project_id}/java-guestbook.

Common image repository formats

Here are examples of how to specify where container images are stored for some common registries:

  • Docker Hub: docker.io/{account}
  • Google Container Registry: gcr.io/{project_id}
  • AWS Elastic Container Registry (ECR): {aws_account_id}.dkr.ecr.{region}.amazonaws.com/{my-app}
  • Azure Container Registry (ACR): {my_acr_name}.azurecr.io/{my-app}