7.8.2.2. Cloud Credential Operator 유틸리티를 사용하여 Azure 리소스 생성
ccoctl azure create-all 명령을 사용하여 Azure 리소스 생성을 자동화할 수 있습니다.
기본적으로 ccoctl은 명령이 실행되는 디렉터리에 오브젝트를 생성합니다. 다른 디렉터리에 오브젝트를 생성하려면 --output-dir 플래그를 사용합니다. 이 절차에서는 <path_to_ccoctl_output_dir>을 사용하여 이 디렉터리를 나타냅니다.
사전 요구 사항
다음이 있어야 합니다.
-
ccoctl바이너리를 추출하여 준비합니다. - Azure CLI를 사용하여 Microsoft Azure 계정에 액세스합니다.
프로세스
다음 명령을 실행하여 설치 파일의 릴리스 이미지로
$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유틸리티를 활성화하여 Azure 인증 정보를 자동으로 감지하려면 다음 명령을 실행하여 Azure CLI에 로그인합니다.$ az loginccoctl툴을 사용하여 다음 명령을 실행하여 모든CredentialsRequest오브젝트를 처리합니다.$ ccoctl azure create-all \ --name=<azure_infra_name> \1 --output-dir=<ccoctl_output_dir> \2 --region=<azure_region> \3 --subscription-id=<azure_subscription_id> \4 --credentials-requests-dir=<path_to_credentials_requests_directory> \5 --dnszone-resource-group-name=<azure_dns_zone_resource_group_name> \6 --tenant-id=<azure_tenant_id> \7 --network-resource-group-name <azure_resource_group>8 - 1
- 추적에 사용되는 모든 생성된 Azure 리소스의 사용자 정의 이름을 지정합니다.
- 2
- 선택 사항:
ccoctl유틸리티에서 오브젝트를 생성할 디렉터리를 지정합니다. 기본적으로 유틸리티는 명령이 실행되는 디렉터리에 오브젝트를 생성합니다. - 3
- 클라우드 리소스를 생성할 Azure 리전을 지정합니다.
- 4
- 사용할 Azure 서브스크립션 ID를 지정합니다.
- 5
- 구성 요소
CredentialsRequest오브젝트에 대한 파일이 포함된 디렉터리를 지정합니다. - 6
- 클러스터의 기본 도메인 Azure DNS 영역을 포함하는 리소스 그룹의 이름을 지정합니다.
- 7
- 사용할 Azure 테넌트 ID를 지정합니다.
- 8
- 선택 사항: 클러스터 리소스 그룹과 다른 경우 가상 네트워크 리소스 그룹을 지정합니다.참고
클러스터에서
TechPreviewNoUpgrade기능 세트에서 활성화한 기술 프리뷰 기능을 사용하는 경우--enable-tech-preview매개변수를 포함해야 합니다.추가 선택적 매개변수 및 사용 방법에 대한 설명을 보려면
azure create-all --help명령을 실행합니다.
검증
OpenShift Container Platform 보안이 생성되었는지 확인하려면
<path_to_ccoctl_output_dir>/manifests디렉터리에 파일을 나열합니다.$ ls <path_to_ccoctl_output_dir>/manifests출력 예
azure-ad-pod-identity-webhook-config.yaml cluster-authentication-02-config.yaml openshift-cloud-controller-manager-azure-cloud-credentials-credentials.yaml openshift-cloud-network-config-controller-cloud-credentials-credentials.yaml openshift-cluster-api-capz-manager-bootstrap-credentials-credentials.yaml openshift-cluster-csi-drivers-azure-disk-credentials-credentials.yaml openshift-cluster-csi-drivers-azure-file-credentials-credentials.yaml openshift-image-registry-installer-cloud-credentials-credentials.yaml openshift-ingress-operator-cloud-credentials-credentials.yaml openshift-machine-api-azure-cloud-credentials-credentials.yamlAzure를 쿼리하여 Microsoft Entra ID 서비스 계정이 생성되었는지 확인할 수 있습니다. 자세한 내용은 Entra ID 서비스 계정 나열에 대한 Azure 설명서를 참조하십시오.