|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * openshift_images/image-configuration-hcp.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="images-configuring-image-registry-settings-hcp_{context}"] |
| 7 | += Configuring image registry settings for {hcp-title} |
| 8 | + |
| 9 | +You can configure image registry settings at cluster creation. The cluster's nodes will use the required configuration after creation. |
| 10 | + |
| 11 | +.Procedure |
| 12 | + |
| 13 | +* Create {hcp-title} clusters with image registry by running the following command: |
| 14 | +
|
| 15 | ++ |
| 16 | +[source,terminal] |
| 17 | +---- |
| 18 | +$ rosa create cluster —cluster-name=<cluster_name> --sts --mode=auto \ |
| 19 | + --hosted-cp --operator-roles-prefix <operator_role_prefix> \ |
| 20 | + --oidc-config-id <id_of_oidc_configuration> \ |
| 21 | + --subnet-ids=<public_subnet_id>,<private_subnet_id> \ |
| 22 | + --registry-config-insecure-registries <insecure_registries> \ |
| 23 | + --registry-config-allowed-registries <allowed_registries> \ |
| 24 | + --registry-config-allowed-registries-for-import <registry_name:insecure> \ |
| 25 | + --registry-config-additional-trusted-ca <additional_trusted_ca_file> |
| 26 | +---- |
| 27 | ++ |
| 28 | +[NOTE] |
| 29 | +==== |
| 30 | +When using the `allowedRegistries`, `blockedRegistries`, or `insecureRegistries` parameter, you can specify an individual repository within a registry. For example: `reg1.io/myrepo/myapp:latest`. |
| 31 | +
|
| 32 | +Avoid insecure external registries to reduce possible security risks. |
| 33 | +Parameters `allowedRegistries`, `blockedRegistries` are mutually exclusive. |
| 34 | +==== |
| 35 | + |
| 36 | +.Verification |
| 37 | + |
| 38 | +. Run the `rosa describe` command to verify that your image registry is enabled by running the following command: |
| 39 | ++ |
| 40 | +[source,terminal] |
| 41 | +---- |
| 42 | +$ rosa describe cluster --cluster=<cluster_name> |
| 43 | +---- |
| 44 | ++ |
| 45 | +.Example output |
| 46 | +[source,terminal] |
| 47 | +---- |
| 48 | +Name: rosa-hcp-test |
| 49 | +Domain Prefix: rosa-hcp-test |
| 50 | +Display Name: rosa-hcp-test |
| 51 | +ID: <cluster_hcp_id> |
| 52 | +External ID: <cluster_hcp_id> |
| 53 | +Control Plane: ROSA Service Hosted |
| 54 | +OpenShift Version: 4.Y.Z |
| 55 | +Channel Group: stable |
| 56 | +DNS: <dns> |
| 57 | +AWS Account: <aws_id> |
| 58 | +AWS Billing Account: <aws_id> |
| 59 | +API URL: <ocm_api> |
| 60 | +Console URL: |
| 61 | +Region: us-east-1 |
| 62 | +Availability: |
| 63 | + - Control Plane: MultiAZ |
| 64 | + - Data Plane: SingleAZ |
| 65 | +Nodes: |
| 66 | + - Compute (desired): 2 |
| 67 | + - Compute (current): 2 |
| 68 | +Network: |
| 69 | + - Type: OVNKubernetes |
| 70 | + - Service CIDR: <service_cidr> |
| 71 | + - Machine CIDR: <machine_cidr> |
| 72 | + - Pod CIDR: <pod_cidr> |
| 73 | + - Host Prefix: /23 |
| 74 | + - Subnets: <subnet_ids> |
| 75 | +EC2 Metadata Http Tokens: optional |
| 76 | +Role (STS) ARN: arn:aws:iam::<aws_id>:role/<account_roles_prefix>-HCP-ROSA-Installer-Role |
| 77 | +Support Role ARN: arn:aws:iam::<aws_id>:role/<account_roles_prefix>-HCP-ROSA-Support-Role |
| 78 | +Instance IAM Roles: |
| 79 | + - Worker: arn:aws:iam::<aws_id>:role/<account_roles_prefix>-HCP-ROSA-Worker-Role |
| 80 | +Operator IAM Roles: |
| 81 | + - arn:aws:iam::<aws_id>:role/<operator_roles_prefix>-kube-system-capa-controller-manager |
| 82 | + - arn:aws:iam::<aws_id>:role/<operator_roles_prefix>-kube-system-control-plane-operator |
| 83 | + - arn:aws:iam::<aws_id>:role/<operator_roles_prefix>-kube-system-kms-provider |
| 84 | + - arn:aws:iam::<aws_id>:role/<operator_roles_prefix>-openshift-image-registry-installer-cloud-cred |
| 85 | + - arn:aws:iam::<aws_id>:role/<operator_roles_prefix>-openshift-ingress-operator-cloud-credentials |
| 86 | + - arn:aws:iam::<aws_id>:role/<operator_roles_prefix>-openshift-cluster-csi-drivers-ebs-cloud-credent |
| 87 | + - arn:aws:iam::<aws_id>:role/<operator_roles_prefix>-openshift-cloud-network-config-controller-cloud |
| 88 | +Managed Policies: Yes |
| 89 | +State: ready |
| 90 | +Private: No |
| 91 | +Delete Protection: Disabled |
| 92 | +Created: Oct 01 2030 09:48:52 UTC |
| 93 | +User Workload Monitoring: Enabled |
| 94 | +OIDC Endpoint URL: https://<endpoint> (Managed) |
| 95 | +Audit Log Forwarding: Disabled |
| 96 | +External Authentication: Disabled |
| 97 | +Etcd Encryption: Disabled |
| 98 | +Registry Configuration: |
| 99 | + - Allowed Registries: <allowed_registry> <1> |
| 100 | + - Insecure Registries: <insecure_registry> <2> |
| 101 | + - Allowed Registries for Import: <3> |
| 102 | + - Domain Name: <domain_name> <4> |
| 103 | + - Insecure: true <5> |
| 104 | +---- |
| 105 | +<1> `Allowed Registries`: A comma-separated list of registries for which image pull and push actions are allowed. |
| 106 | +<2> `Insecure Registries`: A comma-separated list of registries which do not have a valid TLS certificate or only support HTTP connections. |
| 107 | +<3> `Allowed Registries for Import`: Limits the container image registries from which normal users can import images. The format should be a comma-separated list of `domainName:insecure`. |
| 108 | +<4> `domainName`: Specifies a domain name for the registry. |
| 109 | +<5> `insecure`: Indicates whether the registry is secure or insecure. |
| 110 | + |
| 111 | +. List your nodes to check the applied changes by running the following command: |
| 112 | ++ |
| 113 | +[source,terminal] |
| 114 | +---- |
| 115 | +$ oc get nodes |
| 116 | +---- |
| 117 | ++ |
| 118 | +.Example output |
| 119 | +[source,terminal] |
| 120 | +---- |
| 121 | +NAME STATUS ROLES AGE VERSION |
| 122 | +ip-10-0-137-182.us-east-2.compute.internal Ready,SchedulingDisabled worker 65m v1.30.3 |
| 123 | +ip-10-0-188-96.us-east-2.compute.internal Ready worker 65m v1.30.3 |
| 124 | +ip-10-0-200-59.us-east-2.compute.internal Ready worker 63m v1.30.3 |
| 125 | +---- |
0 commit comments