|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * rosa_hcp/rosa-hcp-sts-creating-a-cluster-quickly.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="rosa-hcp-sts-creating-a-cluster-external-auth-cluster-cli_{context}"] |
| 7 | += Creating a {hcp-title} cluster that uses external authentication providers |
| 8 | +:source-highlighter: pygments |
| 9 | +:pygments-style: emacs |
| 10 | +:icons: font |
| 11 | + |
| 12 | +Use the `--external-auth-providers-enabled` flag in the ROSA CLI to create a cluster that uses an external authentication service. |
| 13 | + |
| 14 | +[NOTE] |
| 15 | +==== |
| 16 | +When creating a {hcp-title} cluster, the default machine Classless Inter-Domain Routing (CIDR) is `10.0.0.0/16`. If this does not correspond to the CIDR range for your VPC subnets, add `--machine-cidr <address_block>` to the following commands. |
| 17 | +==== |
| 18 | + |
| 19 | +.Procedure |
| 20 | + |
| 21 | +* If you used the `OIDC_ID`, `SUBNET_IDS`, and `OPERATOR_ROLES_PREFIX` variables to prepare your environment, you can continue to use those variables when creating your cluster. For example, run the following command: |
| 22 | ++ |
| 23 | +[source,terminal] |
| 24 | +---- |
| 25 | +$ rosa create cluster --hosted-cp --subnet-ids=$SUBNET_IDS \ |
| 26 | + --oidc-config-id=$OIDC_ID --cluster-name=<cluster_name> \ |
| 27 | + --operator-roles-prefix=$OPERATOR_ROLES_PREFIX \ |
| 28 | + --external-auth-providers-enabled |
| 29 | +---- |
| 30 | +
|
| 31 | +* If you did not set environmental variables, run the following command: |
| 32 | ++ |
| 33 | +[source,terminal] |
| 34 | +---- |
| 35 | +$ rosa create cluster --cluster-name=<cluster_name> --sts --mode=auto \ |
| 36 | + --hosted-cp --operator-roles-prefix <operator-role-prefix> \ |
| 37 | + --oidc-config-id <ID-of-OIDC-configuration> \ |
| 38 | + --external-auth-providers-enabled \ |
| 39 | + --subnet-ids=<public-subnet-id>,<private-subnet-id> |
| 40 | +---- |
| 41 | +
|
| 42 | +.Verification |
| 43 | +. Verify that your external authentication is enabled <.> in the cluster details by running the following command: |
| 44 | ++ |
| 45 | +[source,terminal] |
| 46 | +---- |
| 47 | +$ rosa describe cluster --cluster=<cluster_name> |
| 48 | +---- |
| 49 | ++ |
| 50 | +.Example output |
| 51 | +[source,terminal,highlight='50'] |
| 52 | +---- |
| 53 | +Name: rosa-ext-test |
| 54 | +Display Name: rosa-ext-test |
| 55 | +ID: <cluster_id> |
| 56 | +External ID: <cluster_ext_id> |
| 57 | +Control Plane: ROSA Service Hosted |
| 58 | +OpenShift Version: 4.Y.Z |
| 59 | +Channel Group: stable |
| 60 | +DNS: <dns> |
| 61 | +AWS Account: <AWS_id> |
| 62 | +AWS Billing Account: <AWS_id> |
| 63 | +API URL: <ocm_api> |
| 64 | +Console URL: |
| 65 | +Region: us-east-1 |
| 66 | +Availability: |
| 67 | + - Control Plane: MultiAZ |
| 68 | + - Data Plane: SingleAZ |
| 69 | +
|
| 70 | +Nodes: |
| 71 | + - Compute (desired): 2 |
| 72 | + - Compute (current): 0 |
| 73 | +Network: |
| 74 | + - Type: OVNKubernetes |
| 75 | + - Service CIDR: <service_cidr> |
| 76 | + - Machine CIDR: <machine_cidr> |
| 77 | + - Pod CIDR: <pod_cidr> |
| 78 | + - Host Prefix: /23 |
| 79 | + - Subnets: <subnet_ids> |
| 80 | +EC2 Metadata Http Tokens: optional |
| 81 | +Role (STS) ARN: arn:aws:iam::<AWS_id>:role/<account_roles_prefix>-HCP-ROSA-Installer-Role |
| 82 | +Support Role ARN: arn:aws:iam::<AWS_id>:role/<account_roles_prefix>-HCP-ROSA-Support-Role |
| 83 | +Instance IAM Roles: |
| 84 | + - Worker: arn:aws:iam::<AWS_id>:role/<account_roles_prefix>-HCP-ROSA-Worker-Role |
| 85 | +Operator IAM Roles: |
| 86 | + - arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-openshift-cloud-network-config-controller-clo |
| 87 | + - arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-kube-system-capa-controller-manager |
| 88 | + - arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-kube-system-control-plane-operator |
| 89 | + - arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-kube-system-kms-provider |
| 90 | + - arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-kube-system-kube-controller-manager |
| 91 | + - arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-openshift-image-registry-installer-cloud-cred |
| 92 | + - arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-openshift-ingress-operator-cloud-credentials |
| 93 | + - arn:aws:iam::<AWS_id>:role/<operator_roles_prefix>-openshift-cluster-csi-drivers-ebs-cloud-crede |
| 94 | +Managed Policies: Yes |
| 95 | +State: ready |
| 96 | +Private: No |
| 97 | +Created: Jan 01 2030 14:25:52 UTC |
| 98 | +User Workload Monitoring: Enabled |
| 99 | +Details Page: https://<url> |
| 100 | +OIDC Endpoint URL: https://<endpoint> (Managed) |
| 101 | +Audit Log Forwarding: Disabled |
| 102 | +External Authentication: Enabled <.> |
| 103 | +---- |
| 104 | + |
| 105 | +. Watch the {hcp-title} installation program logs to track the progress of the cluster creation by running the following command: |
| 106 | ++ |
| 107 | +[source,terminal] |
| 108 | +---- |
| 109 | +$ rosa logs install --cluster=<cluster_name> --watch <1> |
| 110 | +---- |
| 111 | +<1> Optional: To watch for new log messages as the installation progresses, use the `--watch` argument. |
0 commit comments