5.7. 수동으로 IAM 생성
클러스터를 설치하려면 CCO(Cloud Credential Operator)가 수동 모드에서 작동해야 합니다. 설치 프로그램은 수동 모드에 대한 CCO를 구성하는 동안 클라우드 공급자의 ID 및 액세스 관리 보안을 지정해야 합니다.
CCO(Cloud Credential Operator) 유틸리티(ccoctl)를 사용하여 필요한 IBM Cloud® 리소스를 생성할 수 있습니다.
사전 요구 사항
-
ccoctl바이너리를 구성했습니다. -
기존
install-config.yaml파일이 있습니다.
프로세스
파일에
Manual로 설정된credentialsMode매개변수가 포함되도록install-config.yaml구성 파일을 편집합니다.install-config.yaml설정 파일 예apiVersion: v1 baseDomain: cluster1.example.com credentialsMode: Manual compute: - architecture: amd64 hyperthreading: Enabled-
credentialsMode:credentialsMode매개변수를Manual로 설정합니다.
-
매니페스트를 생성하려면 설치 프로그램이 포함된 디렉터리에서 다음 명령을 실행합니다.
$ ./openshift-install create manifests --dir <installation_directory>설치 프로그램이 포함된 디렉터리에서 다음 명령을 실행하여 설치 파일의 릴리스 이미지로
$RELEASE_IMAGE변수를 설정합니다.$ RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}')다음 명령을 실행하여 OpenShift Container Platform 릴리스 이미지에서
CredentialsRequestCR(사용자 정의 리소스) 목록을 추출합니다.$ oc adm release extract \ --from=$RELEASE_IMAGE \ --credentials-requests \ --include \ --install-config=<path_to_directory_with_installation_configuration>/install-config.yaml \ --to=<path_to_directory_for_credentials_requests>-
--included: 특정 클러스터 구성에 필요한 매니페스트만 포함합니다. -
<path_to_directory_with_installation_configuration> :install-config.yaml파일의 위치를 지정합니다. <path_to_directory_for_credentials_requests>:CredentialsRequest오브젝트를 저장하려는 디렉터리의 경로를 지정합니다. 지정된 디렉터리가 없으면 이 명령이 이를 생성합니다.이 명령을 수행하면 각
CredentialsRequest오브젝트에 대해 YAML 파일이 생성됩니다.샘플
CredentialsRequest개체apiVersion: cloudcredential.openshift.io/v1 kind: CredentialsRequest metadata: labels: controller-tools.k8s.io: "1.0" name: openshift-image-registry-ibmcos namespace: openshift-cloud-credential-operator spec: secretRef: name: installer-cloud-credentials namespace: openshift-image-registry providerSpec: apiVersion: cloudcredential.openshift.io/v1 kind: IBMCloudProviderSpec policies: - attributes: - name: serviceName value: cloud-object-storage roles: - crn:v1:bluemix:public:iam::::role:Viewer - crn:v1:bluemix:public:iam::::role:Operator - crn:v1:bluemix:public:iam::::role:Editor - crn:v1:bluemix:public:iam::::serviceRole:Reader - crn:v1:bluemix:public:iam::::serviceRole:Writer - attributes: - name: resourceType value: resource-group roles: - crn:v1:bluemix:public:iam::::role:Viewer
-
각 인증 정보 요청에 대한 서비스 ID를 생성하고, 정의된 정책을 할당하고, API 키를 생성하고, 보안을 생성합니다.
$ ccoctl ibmcloud create-service-id \ --credentials-requests-dir=<path_to_credential_requests_directory> \ --name=<cluster_name> \ --output-dir=<installation_directory> \ --resource-group-name=<resource_group_name>-
<path_to_credential_requests_directory> :CredentialsRequest오브젝트의 파일이 포함된 디렉터리를 지정합니다. -
<CLUSTER_NAME> : OpenShift Container Platform 클러스터의 이름을 지정합니다. -
&
lt;installation_directory> : 선택적 매개변수입니다.ccoctl유틸리티에서 오브젝트를 생성할 디렉터리를 지정합니다. 기본적으로 유틸리티는 명령을 실행하는 디렉터리에 오브젝트를 생성합니다. <resource_group_name> : 선택 매개변수입니다. 액세스 정책의 범위를 지정하는 데 사용되는 리소스 그룹의 이름을 지정합니다.참고클러스터에 대해
TechPreviewNoUpgrade기능 세트를 사용하여 기술 프리뷰 기능을 활성화한 경우CredentialsRequest오브젝트 구성에--enable-tech-preview매개변수를 포함해야 합니다.잘못된 리소스 그룹 이름을 제공한 경우 부트스트랩 단계 중에 설치에 실패합니다. 올바른 리소스 그룹 이름을 찾으려면 다음 명령을 실행합니다.
$ grep resourceGroupName <installation_directory>/manifests/cluster-infrastructure-02-config.yml
-
검증
-
클러스터의
매니페스트디렉터리에 적절한 시크릿이 있는지 확인합니다.