7.8. 수동으로 IAM 생성
클러스터를 설치하려면 CCO(Cloud Credential Operator)가 수동 모드에서 작동해야 합니다. 설치 프로그램은 수동 모드에 대한 CCO를 구성하는 동안 클라우드 공급자의 ID 및 액세스 관리 보안을 지정해야 합니다.
CCO(Cloud Credential Operator) 유틸리티(ccoctl
)를 사용하여 필요한 IBM Cloud VPC 리소스를 생성할 수 있습니다.
사전 요구 사항
-
ccoctl
바이너리를 구성했습니다. -
기존
install-config.yaml
파일이 있습니다.
프로세스
install-config.yaml
구성 파일을 편집하여credentialsMode
매개 변수가Manual
로 설정되도록 합니다.install-config.yaml
설정 파일 예apiVersion: v1 baseDomain: cluster1.example.com credentialsMode: Manual 1 compute: - architecture: ppc64le hyperthreading: Enabled
- 1
- 이 행은
credentialsMode
매개변수를Manual
로 설정하기 위해 추가됩니다.
매니페스트를 생성하려면 설치 프로그램이 포함된 디렉터리에서 다음 명령을 실행합니다.
$ ./openshift-install create manifests --dir <installation_directory>
설치 프로그램이 포함된 디렉터리에서
openshift-install
바이너리가 다음을 사용하도록 빌드된 OpenShift Container Platform 릴리스 이미지를 가져옵니다.$ RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}')
OpenShift Container Platform 릴리스 이미지에서
CredentialsRequest
오브젝트를 추출합니다.$ oc adm release extract \ --from=$RELEASE_IMAGE \ --credentials-requests \ --cloud=<provider_name> \1 --to=<path_to_credential_requests_directory> 2
이 명령을 수행하면 각
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> \1 --name <cluster_name> \2 --output-dir <installation_directory> \ --resource-group-name <resource_group_name> 3
참고클러스터에서
TechPreviewNoUpgrade
기능 세트에서 활성화한 기술 프리뷰 기능을 사용하는 경우--enable-tech-preview
매개변수를 포함해야 합니다.잘못된 리소스 그룹 이름이 제공되면 부트스트랩 단계 중에 설치에 실패합니다. 올바른 리소스 그룹 이름을 찾으려면 다음 명령을 실행합니다.
$ grep resourceGroup <installation_directory>/manifests/cluster-infrastructure-02-config.yml
검증
-
클러스터의
manifests
디렉터리에 적절한 시크릿이 생성되었는지 확인합니다.