이 페이지에서는 VMware용 Google Distributed Cloud(소프트웨어만 해당) 관리 클러스터에서 Google의 Artifact Registry를 워크로드 이미지를 저장하는 데 사용할 수 있는 비공개 Docker 레지스트리로 구성하는 방법을 설명합니다. 비공개 레지스트리를 워크로드 이미지 저장소로 구성하면 클러스터를 만들거나 업그레이드할 때 Google Distributed Cloud 시스템 이미지 또한 비공개 레지스트리에 저장됩니다.
Artifact Registry는 여러 가지 인증 방법을 지원하지만, Artifact Registry를 비공개 레지스트리로 사용하려면 서비스 계정 키를 인증에 사용해야 합니다. 이 페이지에서는 관리자 클러스터 구성 파일의 privateRegistry 섹션에 필요한 주소, 사용자 인증 정보, CA 인증서를 가져오는 방법을 설명합니다.
사용자 인증 정보 파일 구성
레지스트리에 대한 인증을 아직 구성하지 않았으면 Docker용 Artifact Registry 인증 구성의 안내에 따라 서비스 계정을 사용해 인증을 구성해야 합니다. 인증에 JSON 키 파일이 포함된 서비스 계정을 사용해야 합니다.
다음 예시에 표시된 것처럼 사용자 인증 정보 구성 파일인 admin-creds.yaml을 만듭니다. username은 "_json_key"여야 합니다. name 필드에는 임의의 값을 사용할 수 있지만, 이후 privateRegistry.entry 필드에 추가할 값과 일치해야 합니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-08-31(UTC)"],[],[],null,["This page describes how to configure a Google Distributed Cloud (software only) for\nVMware admin cluster to use Google's\n[Artifact Registry](/artifact-registry/docs/overview) as the private Docker registry\nwhere you can store workload images. When you configure a private registry to\nstore workload images, the Google Distributed Cloud system images are also stored in the\nprivate registry when you create or upgrade clusters.\n\nAlthough Artifact Registry supports several different\n[authentication methods](/artifact-registry/docs/docker/authentication#methods),\nyou must use a service account key for authentication to use Artifact Registry as a\nprivate registry. The steps on this page explain how to get the address,\ncredentials, and CA certificate that the\n[`privateRegistry`](/kubernetes-engine/distributed-cloud/vmware/docs/how-to/admin-cluster-configuration-file-latest#privateregistry-section)\nsection in the admin cluster configuration file requires.\n\nConfigure a credentials file\n\n1. If you haven't configured authentication for the registry, follow the steps\n in\n [Configure authentication to Artifact Registry for Docker](/artifact-registry/docs/docker/authentication)\n to configure authentication using a service account. You must use a\n service account with a JSON key file for authentication.\n\n2. Create a credentials configuration file, `admin-creds.yaml`, as shown in\n the following example. The `username` must be `\"_json_key\"`. You can use any\n value for the `name` field, as long it matches the value you will add to the\n `privateRegistry.entry` field.\n\n apiVersion: v1\n kind: \"CredentialFile\"\n items:\n - name: \"private-registry-creds\"\n username: \"_json_key\"\n password:\n\n3. In the directory where the JSON key file for the registry's service account\n is located, run `cat` on the key file to output the contents.\n\n4. Copy the entire JSON key contents and paste it in the `password` field. Make\n sure to surround the JSON key contents with single quotes since the contents\n contain double quotes. For example:\n\n apiVersion: v1\n kind: \"CredentialFile\"\n items:\n - name: \"private-registry-creds\"\n username: \"_json_key\"\n password: '{\n \"type\": \"service_account\",\n \"project_id\": \"example-project-12345\",\n \"private_key_id\": \"d2661ccb21e686658c6552cf1e0166b857091b2e\",\n \"private_key\": \"-----BEGIN PRIVATE ... -----END PRIVATE KEY-----\\n\",\n \"client_email\": \"test-537@example-project-12345.iam.gserviceaccount.com\",\n \"client_id\": \"111772984510027821291\",\n \"auth_uri\": \"https://accounts.google.com/o/oauth2/auth\",\n \"token_uri\": \"https://oauth2.googleapis.com/token\",\n \"auth_provider_x509_cert_url\": \"https://www.googleapis.com/oauth2/v1/certs\",\n \"client_x509_cert_url\": \"https://www.googleapis.com/robot/v1/metadata/x509/test-537%40example-project-12345.iam.gserviceaccount.com\",\n \"universe_domain\": \"googleapis.com\"\n }\n '\n\nConfigure `privateRegistry` in the admin cluster configuration file\n\nTo use a private registry, you need to configure the `privateRegistry` section\nwhen you create the admin cluster. After the cluster is created, you can't\nchange the `privateRegistry.address`, but the other settings are mutable and\nyou can update them if needed.\n\n1. Run the following command to get the registry address:\n\n gcloud artifacts repositories describe \u003cvar translate=\"no\"\u003eREGISTRY_NAME\u003c/var\u003e \\\n --project=\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e\n --location=\u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eREGISTRY_NAME\u003c/var\u003e: the name of the registry.\n - \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: the ID of the project the registry was created in.\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: the region that the registry was created in, such as `us-west2`.\n\n The output is similar to the following: \n\n Encryption: Google-managed key\n Repository Size: 0.000MB\n cleanupPolicyDryRun: true\n createTime: '2025-01-28T03:27:57.701672Z'\n dockerConfig: {}\n format: DOCKER\n mode: STANDARD_REPOSITORY\n name: projects/example-project-12345/locations/us-west2/repositories/test\n registryUri: us-west2-docker.pkg.dev/example-project-12345/test\n satisfiesPzi: true\n updateTime: '2025-01-28T03:27:57.701672Z'\n vulnerabilityScanningConfig:\n enablementConfig: INHERITED\n enablementState: SCANNING_ACTIVE\n lastEnableTime: '2025-01-28T03:27:49.385246079Z'\n\n Use the `registryUri` value in the output for the `privateRegistry.address`.\n2. Run the following command to extract the CA certificate of the Artifact Registry\n endpoint and save it to a file called `ar-ca.pem`:\n\n true | openssl s_client -connect \u003cvar translate=\"no\"\u003eREGION\u003c/var\u003e-docker.pkg.dev:443 -showcerts 2\u003e/dev/null| sed -ne '/-BEGIN/,/-END/p' \u003e ar-ca.pem\n\n3. Fill in the `privateRegistry` section as follows:\n\n privateRegistry:\n address: \"\u003cvar translate=\"no\"\u003eREGISTRY_ADDRESS\u003c/var\u003e\"\n credentials:\n fileRef:\n path: \"\u003cvar translate=\"no\"\u003eCREDENTIAL_FILE_PATH\u003c/var\u003e\"\n entry: \"private-registry-creds\"\n caCertPath: \"\u003cvar translate=\"no\"\u003eCA_CERT_PATH\u003c/var\u003e\"\n componentAccessServiceAccountKeyPath: \"\u003cvar translate=\"no\"\u003eCOMPONENT_ACCESS_KEY_PATH\u003c/var\u003e\"\n\n Replace the following:\n - \u003cvar translate=\"no\"\u003eREGISTRY_ADDRESS\u003c/var\u003e: the `registryUri` value.\n - \u003cvar translate=\"no\"\u003eCREDENTIAL_FILE_PATH\u003c/var\u003e: the full or relative path of the `admin-creds.yaml` file.\n - \u003cvar translate=\"no\"\u003eCA_CERT_PATH\u003c/var\u003e: the full or relative path of the `ar-ca.pem` file.\n - \u003cvar translate=\"no\"\u003eCOMPONENT_ACCESS_KEY_PATH\u003c/var\u003e: the full or relative path of the component access service account key file."]]