This page describes the process of uploading a container image to Harbor, and deploying that image in your GDC Sandbox instance.
Preparation
Follow the instructions in Connect to your instance to connect to your instance with Linux command line access. You can connect to your gateway over Remote Desktop, or run
sshuttleon your Linux machine.Ask your Organization IAM Admin to grant you the following roles at the project level:
- Secret Admin (
secret-admin): required to create Kubernetes secrets and operate in the GDC console. - Namespace Admin (
namespace-admin): required to deploy container workloads in your project. - Namespace Viewer (
namespace-viewer): required to view project and namespace resources. - Project Viewer (
project-viewer): required to access the GDC console and the Distributed Cloud CLI. - Harbor Instance Viewer (
harbor-instance-viewer): required to view and select a Harbor instance. - Harbor Project Creator (
harbor-project-creator): required to access and manage a Harbor project. - Project NetworkPolicy Admin (
project-networkpolicy-admin): required to create and manage project network policies.
- Secret Admin (
Set environment variables that will be used in the following instructions:
export TENANT_PROJECT=TENANT_PROJECT # Intended deployment project for the container workflow. export HARBOR_INSTANCE_NAME=HARBOR_INSTANCE_NAME # Harbor Container Registry instance name. export HARBOR_PROJECT=HARBOR_PROJECT # Container registry project name for your images. export AO_USER=AO_USER # Your user name in the instance, e.g.: fop-my-user@example.com. export INSTANCE_URL=${HARBOR_INSTANCE_NAME}-${TENANT_PROJECT}.org-1.zone1.google.gdch.test. export DOCKER_CONFIG_PATH=DOCKER_CONFIG_PATH # Path to docker config file e.g.: /root/.docker/config.json.To create a Harbor registry instance, follow Create a Harbor registry instance, or you can use the pre-created Sandbox Harbor instance: the default
user-projectin GDC Sandbox comes with an already deployed Harbor Instance,user-haas-instance, which can be used for development.