Manually creating IAM for Azure

    The Cloud Credential Operator (CCO) manages cloud provider credentials as Kubernetes custom resource definitions (CRDs). You can configure the CCO to suit the security requirements of your organization by setting different values for the credentialsMode parameter in the install-config.yaml file.

    If you prefer not to store an administrator-level credential secret in the cluster kube-system project, you can set the credentialsMode parameter for the CCO to Manual when installing OKD and manage your cloud credentials manually.

    Using manual mode allows each cluster component to have only the permissions it requires, without storing an administrator-level credential in the cluster. You can also use this mode if your environment does not have connectivity to the cloud provider public IAM endpoint. However, you must manually reconcile permissions with new release images for every upgrade. You must also manually supply credentials for every component that requests them.

    Additional resources

    • For a detailed description of all available CCO credential modes and their supported platforms, see .

    The Cloud Credential Operator (CCO) can be put into manual mode prior to installation in environments where the cloud identity and access management (IAM) APIs are not reachable, or the administrator prefers not to store an administrator-level credential secret in the cluster kube-system namespace.

    Procedure

    1. Change to the directory that contains the installation program and create the install-config.yaml file by running the following command:

      where <installation_directory> is the directory in which the installation program creates files.

    2. Edit the install-config.yaml configuration file so that it contains the credentialsMode parameter set to Manual.

      Example install-config.yaml configuration file

      1. apiVersion: v1
      2. baseDomain: cluster1.example.com
      3. credentialsMode: Manual (1)
      4. compute:
      5. - architecture: amd64
      6. hyperthreading: Enabled
      7. ...
      1. $ openshift-install create manifests --dir <installation_directory>

      where <installation_directory> is the directory in which the installation program creates files.

    3. From the directory that contains the installation program, obtain details of the OKD release image that your openshift-install binary is built to use by running the following command:

      Example output

    4. Locate all CredentialsRequest objects in this release image that target the cloud you are deploying on by running the following command:

      1. $ oc adm release extract quay.io/openshift-release-dev/ocp-release:4.y.z-x86_64 \
      2. --credentials-requests \
      3. --cloud=azure

      This command creates a YAML file for each CredentialsRequest object.

      Sample CredentialsRequest object

      1. kind: CredentialsRequest
      2. metadata:
      3. name: <component-credentials-request>
      4. namespace: openshift-cloud-credential-operator
      5. ...
      6. spec:
      7. providerSpec:
      8. apiVersion: cloudcredential.openshift.io/v1
      9. kind: AzureProviderSpec
      10. roleBindings:
      11. - role: Contributor
      12. ...
    5. Create YAML files for secrets in the openshift-install manifests directory that you generated previously. The secrets must be stored using the namespace and secret name defined in the spec.secretRef for each CredentialsRequest object.

      Sample CredentialsRequest object with secrets

      1. apiVersion: cloudcredential.openshift.io/v1
      2. metadata:
      3. name: <component-credentials-request>
      4. namespace: openshift-cloud-credential-operator
      5. ...
      6. spec:
      7. providerSpec:
      8. kind: AzureProviderSpec
      9. roleBindings:
      10. - role: Contributor
      11. ...
      12. secretRef:
      13. name: <component-secret>
      14. namespace: <component-namespace>
      15. ...

      Sample Secret object

      • To find CredentialsRequest objects with the TechPreviewNoUpgrade annotation, run the following command:

        1. $ grep "release.openshift.io/feature-set" *

        Example output

        1. 0000_30_capi-operator_00_credentials-request.yaml: release.openshift.io/feature-set: TechPreviewNoUpgrade
    6. From the directory that contains the installation program, proceed with your cluster creation:

      1. $ openshift-install create cluster --dir <installation_directory>

    Additional resources