4.10.2.2. Cloud Credential Operator 유틸리티를 사용하여 Google Cloud 리소스 생성
ccoctl gcp create-all 명령을 사용하여 Google Cloud 리소스 생성을 자동화할 수 있습니다.
기본적으로 ccoctl은 명령이 실행되는 디렉터리에 오브젝트를 생성합니다. 다른 디렉터리에 오브젝트를 생성하려면 --output-dir 플래그를 사용합니다. 이 절차에서는 <path_to_ccoctl_output_dir>을 사용하여 이 디렉터리를 나타냅니다.
사전 요구 사항
다음이 있어야 합니다.
-
ccoctl바이너리를 추출하여 준비합니다.
프로세스
다음 명령을 실행하여 설치 파일의 릴리스 이미지로
$RELEASE_IMAGE변수를 설정합니다.$ RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}')다음 명령을 실행하여 OpenShift Container Platform 릴리스 이미지에서
CredentialsRequest오브젝트 목록을 추출합니다.$ oc adm release extract \ --from=$RELEASE_IMAGE \ --credentials-requests \ --included \1 --install-config=<path_to_directory_with_installation_configuration>/install-config.yaml \2 --to=<path_to_directory_for_credentials_requests>3 ccoctl툴을 사용하여 다음 명령을 실행하여 모든CredentialsRequest오브젝트를 처리합니다.$ ccoctl gcp create-all \ --name=<name> \1 --region=<gcp_region> \2 --project=<gcp_project_id> \3 --credentials-requests-dir=<path_to_credentials_requests_directory>4 - 1
- 추적에 사용되는 모든 생성된 Google Cloud 리소스의 사용자 정의 이름을 지정합니다. Google Cloud Filestore CSI(Container Storage Interface) Driver Operator를 설치하려는 경우 이 값을 유지합니다.
- 2
- 클라우드 리소스가 생성될 Google Cloud 리전을 지정합니다.
- 3
- 클라우드 리소스가 생성될 Google Cloud 프로젝트 ID를 지정합니다.
- 4
- Google Cloud 서비스 계정을 생성하려면
CredentialsRequest매니페스트 파일이 포함된 디렉터리를 지정합니다.참고클러스터에서
TechPreviewNoUpgrade기능 세트에서 활성화한 기술 프리뷰 기능을 사용하는 경우--enable-tech-preview매개변수를 포함해야 합니다.
검증
OpenShift Container Platform 보안이 생성되었는지 확인하려면
<path_to_ccoctl_output_dir>/manifests디렉터리에 파일을 나열합니다.$ ls <path_to_ccoctl_output_dir>/manifests출력 예
cluster-authentication-02-config.yaml openshift-cloud-controller-manager-gcp-ccm-cloud-credentials-credentials.yaml openshift-cloud-credential-operator-cloud-credential-operator-gcp-ro-creds-credentials.yaml openshift-cloud-network-config-controller-cloud-credentials-credentials.yaml openshift-cluster-api-capg-manager-bootstrap-credentials-credentials.yaml openshift-cluster-csi-drivers-gcp-pd-cloud-credentials-credentials.yaml openshift-image-registry-installer-cloud-credentials-credentials.yaml openshift-ingress-operator-cloud-credentials-credentials.yaml openshift-machine-api-gcp-cloud-credentials-credentials.yamlGoogle Cloud를 쿼리하여 IAM 서비스 계정이 생성되었는지 확인할 수 있습니다. 자세한 내용은 IAM 서비스 계정 나열에 대한 Google Cloud 설명서를 참조하십시오.