9.4.7. 수동으로 IBM Cloud VPC용 IAM 생성

클러스터를 설치하려면 CCO(Cloud Credential Operator)가 수동 모드에서 작동해야 합니다. 설치 프로그램은 수동 모드에 대한 CCO를 구성하는 동안 클라우드 공급자의 ID 및 액세스 관리 보안을 지정해야 합니다.

CCO(Cloud Credential Operator) 유틸리티(ccoctl)를 사용하여 필요한 IBM Cloud VPC 리소스를 생성할 수 있습니다.

사전 요구 사항

  • ccoctl 바이너리를 구성했습니다.
  • 기존 install-config.yaml 파일이 있습니다.

절차

  1. install-config.yaml 구성 파일을 편집하여 credentialsMode 매개 변수가 Manual로 설정되도록 합니다.

    install-config.yaml 설정 파일 예

    apiVersion: v1
    baseDomain: cluster1.example.com
    credentialsMode: Manual 1
    compute:
    - architecture: amd64
      hyperthreading: Enabled
    ...

    1
    이 행은 credentialsMode 매개변수를 Manual로 설정하기 위해 추가됩니다.
  2. 매니페스트를 생성하려면 설치 프로그램이 포함된 디렉터리에서 다음 명령을 실행합니다.

    $ openshift-install create manifests --dir <installation_directory>
  3. 설치 프로그램이 포함된 디렉터리에서 openshift-install 바이너리가 다음을 사용하도록 빌드된 OpenShift Container Platform 릴리스 이미지를 가져옵니다.

    $ RELEASE_IMAGE=$(./openshift-install version | awk '/release image/ {print $3}')
  4. OpenShift Container Platform 릴리스 이미지에서 CredentialsRequest 오브젝트를 추출합니다.

    $ oc adm release extract --cloud=ibmcloud --credentials-requests $RELEASE_IMAGE \
        --to=<path_to_credential_requests_directory> 1
    1
    인증 정보 요청이 저장되는 디렉터리입니다.

    이 명령을 수행하면 각 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

  5. 각 인증 정보 요청의 서비스 ID를 생성하고, 정의된 정책을 할당하고, IBM Cloud VPC에 API 키를 생성하고, 보안을 생성합니다.

    $ ccoctl ibmcloud create-service-id \
        --credentials-requests-dir <path_to_store_credential_request_templates> \ 1
        --name <cluster_name> \ 2
        --output-dir <installation_directory> \
        --resource-group-name <resource_group_name> 3
    1
    인증 정보 요청이 저장되는 디렉터리입니다.
    2
    OpenShift Container Platform 클러스터의 이름입니다.
    3
    선택 사항: 액세스 정책 범위를 지정하는 데 사용되는 리소스 그룹의 이름입니다.
    참고

    클러스터에서 TechPreviewNoUpgrade 기능 세트에서 활성화한 기술 프리뷰 기능을 사용하는 경우 --enable-tech-preview 매개변수를 포함해야 합니다.

    잘못된 리소스 그룹 이름이 제공되면 부트스트랩 단계 중에 설치에 실패합니다. 올바른 리소스 그룹 이름을 찾으려면 다음 명령을 실행합니다.

    $ grep resourceGroupName <installation_directory>/manifests/cluster-infrastructure-02-config.yml

검증

  • 클러스터의 manifests 디렉터리에 적절한 시크릿이 생성되었는지 확인합니다.