Chapter 9. Red Hat OpenShift Service on AWS clusters without a CNI plugin
You can use your own Container Network Interface (CNI) plugin when creating a Red Hat OpenShift Service on AWS cluster. You can create a Red Hat OpenShift Service on AWS cluster without a CNI and install your own CNI plugin after cluster creation.
For customers who choose to use their own CNI, the responsibility of CNI plugin support belongs to the customer in coordination with their chosen CNI vendor.
The default plugin for Red Hat OpenShift Service on AWS is the OVN-Kubernetes network plugin. This plugin is the only Red Hat supported CNI plugin for Red Hat OpenShift Service on AWS.
If you choose to use your own CNI for Red Hat OpenShift Service on AWS clusters, it is strongly recommended that you obtain commercial support from the plugin vendor before creating your clusters. Red Hat support cannot assist with CNI-related issues such as pod to pod traffic for customers who choose to use their own CNI. Red Hat still provides support for all non-CNI issues. If you want CNI-related support from Red Hat, you must install the cluster with the default OVN-Kubernetes network plugin. For more information, see the responsibility matrix.
9.1. Creating a Red Hat OpenShift Service on AWS cluster without a CNI plugin Copy linkLink copied to clipboard!
9.1.1. Prerequisites Copy linkLink copied to clipboard!
- Ensure that you have completed the AWS prerequisites.
- Ensure that you have a configured virtual private cloud (VPC).
9.1.2. Creating the account-wide STS roles and policies Copy linkLink copied to clipboard!
Before you create your Red Hat OpenShift Service on AWS cluster, you must create the required account-wide roles and policies.
Specific AWS-managed policies for Red Hat OpenShift Service on AWS must be attached to each role. Customer-managed policies must not be used with these required account roles. For more information regarding AWS-managed policies for Red Hat OpenShift Service on AWS clusters, see AWS managed policies for ROSA.
Prerequisites
- You have completed the AWS prerequisites for Red Hat OpenShift Service on AWS.
- You have available AWS service quotas.
- You have enabled the Red Hat OpenShift Service on AWS in the AWS Console.
-
You have installed and configured the latest ROSA CLI (
rosa
) on your installation host. - You have logged in to your Red Hat account by using the ROSA CLI.
Procedure
If they do not exist in your AWS account, create the required account-wide STS roles and attach the policies by running the following command:
rosa create account-roles --hosted-cp
$ rosa create account-roles --hosted-cp
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Optional: Set your prefix as an environmental variable by running the following command:
export ACCOUNT_ROLES_PREFIX=<account_role_prefix>
$ export ACCOUNT_ROLES_PREFIX=<account_role_prefix>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow View the value of the variable by running the following command:
echo $ACCOUNT_ROLES_PREFIX
$ echo $ACCOUNT_ROLES_PREFIX
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
ManagedOpenShift
ManagedOpenShift
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
For more information regarding AWS managed IAM policies for Red Hat OpenShift Service on AWS, see AWS managed IAM policies for ROSA.
9.1.3. Creating an OpenID Connect configuration Copy linkLink copied to clipboard!
When creating a Red Hat OpenShift Service on AWS cluster, you can create the OpenID Connect (OIDC) configuration before creating your cluster. This configuration is registered to be used with OpenShift Cluster Manager.
Prerequisites
- You have completed the AWS prerequisites for Red Hat OpenShift Service on AWS.
-
You have installed and configured the latest ROSA CLI,
rosa
, on your installation host.
Procedure
To create your OIDC configuration alongside the AWS resources, run the following command:
rosa create oidc-config --mode=auto --yes
$ rosa create oidc-config --mode=auto --yes
Copy to Clipboard Copied! Toggle word wrap Toggle overflow This command returns the following information.
Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow When creating your cluster, you must supply the OIDC config ID. The CLI output provides this value for
--mode auto
, otherwise you must determine these values based onaws
CLI output for--mode manual
.Optional: you can save the OIDC configuration ID as a variable to use later. Run the following command to save the variable:
export OIDC_ID=<oidc_config_id>
$ export OIDC_ID=<oidc_config_id>
1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- In the example output above, the OIDC configuration ID is 13cdr6b.
View the value of the variable by running the following command:
echo $OIDC_ID
$ echo $OIDC_ID
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
13cdr6b
13cdr6b
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
You can list the possible OIDC configurations available for your clusters that are associated with your user organization. Run the following command:
rosa list oidc-config
$ rosa list oidc-config
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
ID MANAGED ISSUER URL SECRET ARN 2330dbs0n8m3chkkr25gkkcd8pnj3lk2 true https://dvbwgdztaeq9o.cloudfront.net/2330dbs0n8m3chkkr25gkkcd8pnj3lk2 233hvnrjoqu14jltk6lhbhf2tj11f8un false https://oidc-r7u1.s3.us-east-1.amazonaws.com aws:secretsmanager:us-east-1:242819244:secret:rosa-private-key-oidc-r7u1-tM3MDN
ID MANAGED ISSUER URL SECRET ARN 2330dbs0n8m3chkkr25gkkcd8pnj3lk2 true https://dvbwgdztaeq9o.cloudfront.net/2330dbs0n8m3chkkr25gkkcd8pnj3lk2 233hvnrjoqu14jltk6lhbhf2tj11f8un false https://oidc-r7u1.s3.us-east-1.amazonaws.com aws:secretsmanager:us-east-1:242819244:secret:rosa-private-key-oidc-r7u1-tM3MDN
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
9.1.4. Creating Operator roles and policies Copy linkLink copied to clipboard!
When you deploy a Red Hat OpenShift Service on AWS cluster, you must create the Operator IAM roles. The cluster Operators use the Operator roles and policies to obtain the temporary permissions required to carry out cluster operations, such as managing back-end storage and external access to a cluster.
Prerequisites
- You have completed the AWS prerequisites for Red Hat OpenShift Service on AWS.
-
You have installed and configured the latest ROSA CLI (
rosa
), on your installation host. - You created the account-wide AWS roles.
Procedure
To create your Operator roles, run the following command:
rosa create operator-roles --hosted-cp --prefix=$OPERATOR_ROLES_PREFIX --oidc-config-id=$OIDC_ID --installer-role-arn arn:aws:iam::$AWS_ACCOUNT_ID:role/${ACCOUNT_ROLES_PREFIX}-HCP-ROSA-Installer-Role
$ rosa create operator-roles --hosted-cp --prefix=$OPERATOR_ROLES_PREFIX --oidc-config-id=$OIDC_ID --installer-role-arn arn:aws:iam::$AWS_ACCOUNT_ID:role/${ACCOUNT_ROLES_PREFIX}-HCP-ROSA-Installer-Role
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The following breakdown provides options for the Operator role creation.
rosa create operator-roles --hosted-cp
$ rosa create operator-roles --hosted-cp --prefix=$OPERATOR_ROLES_PREFIX
1 --oidc-config-id=$OIDC_ID
2 --installer-role-arn arn:aws:iam::$AWS_ACCOUNT_ID:role/$ACCOUNT_ROLES_PREFIX-HCP-ROSA-Installer-Role
3 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- You must supply a prefix when creating these Operator roles. Failing to do so produces an error. See the Additional resources of this section for information on the Operator prefix.
- 2
- This value is the OIDC configuration ID that you created for your Red Hat OpenShift Service on AWS cluster.
- 3
- This value is the installer role ARN that you created when you created the Red Hat OpenShift Service on AWS account roles.
You must include the
--hosted-cp
parameter to create the correct roles for Red Hat OpenShift Service on AWS clusters. This command returns the following information.Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow The Operator roles are now created and ready to use for creating your Red Hat OpenShift Service on AWS cluster.
Verification
You can list the Operator roles associated with your Red Hat OpenShift Service on AWS account. Run the following command:
rosa list operator-roles
$ rosa list operator-roles
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Example output
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- After the command runs, it displays all the prefixes associated with your AWS account and notes how many roles are associated with this prefix. If you need to see all of these roles and their details, enter "Yes" on the detail prompt to have these roles listed out with specifics.
9.2. Creating the cluster Copy linkLink copied to clipboard!
When using the ROSA command-line interface (CLI), rosa
, to create a cluster, you can add an optional flag --no-cni
to create a cluster without a CNI plugin.
Prerequisites
- You have completed the AWS prerequisites for Red Hat OpenShift Service on AWS.
- You have available AWS service quotas.
- You have enabled the Red Hat OpenShift Service on AWS in the AWS Console.
-
You have installed and configured the latest ROSA CLI (
rosa
) on your installation host. Runrosa version
to see your currently installed version of the ROSA CLI. If a newer version is available, the CLI provides a link to download this upgrade. - You have logged in to your Red Hat account by using the ROSA CLI.
- You have created an OIDC configuration.
- You have verified that the AWS Elastic Load Balancing (ELB) service role exists in your AWS account.
Procedure
You can create your Red Hat OpenShift Service on AWS cluster with one of the following commands.
NoteWhen creating a Red Hat OpenShift Service on AWS 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.Create a cluster with a single, initial machine pool, publicly available API, publicly available Ingress, and no CNI plugin by running the following command:
rosa create cluster --cluster-name=<cluster_name> \ --sts --mode=auto --hosted-cp --operator-roles-prefix <operator-role-prefix> \ --oidc-config-id <ID-of-OIDC-configuration> --subnet-ids=<public-subnet-id>,<private-subnet-id> --no-cni
$ rosa create cluster --cluster-name=<cluster_name> \ --sts --mode=auto --hosted-cp --operator-roles-prefix <operator-role-prefix> \ --oidc-config-id <ID-of-OIDC-configuration> --subnet-ids=<public-subnet-id>,<private-subnet-id> --no-cni
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a cluster with a single, initial machine pool, privately available API, privately available Ingress, and no CNI plugin by running the following command:
rosa create cluster --private --cluster-name=<cluster_name> \ --sts --mode=auto --hosted-cp --subnet-ids=<private-subnet-id> --no-cni
$ rosa create cluster --private --cluster-name=<cluster_name> \ --sts --mode=auto --hosted-cp --subnet-ids=<private-subnet-id> --no-cni
Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you used the
OIDC_ID
,SUBNET_IDS
, andOPERATOR_ROLES_PREFIX
variables to prepare your environment, you can continue to use those variables when creating your cluster without a CNI plugin. For example, run the following command:rosa create cluster --hosted-cp --subnet-ids=$SUBNET_IDS --oidc-config-id=$OIDC_ID --cluster-name=<cluster_name> --operator-roles-prefix=$OPERATOR_ROLES_PREFIX --no-cni
$ rosa create cluster --hosted-cp --subnet-ids=$SUBNET_IDS --oidc-config-id=$OIDC_ID --cluster-name=<cluster_name> --operator-roles-prefix=$OPERATOR_ROLES_PREFIX --no-cni
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Check the status of your cluster by running the following command:
rosa describe cluster --cluster=<cluster_name>
$ rosa describe cluster --cluster=<cluster_name>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow ImportantWhen you first log in to the cluster after it reaches
ready
status, the nodes will still be in thenot ready
state until you install your own CNI plugin. After CNI installation, the nodes will change toready
.The following
State
field changes are listed in the output as the cluster installation progresses:-
pending (Preparing account)
-
installing (DNS setup in progress)
-
installing
ready
NoteIf the installation fails or the
State
field does not change toready
after more than 10 minutes, check the installation troubleshooting documentation for details. For more information, see Troubleshooting installations. For steps to contact Red Hat Support for assistance, see Getting support for Red Hat OpenShift Service on AWS.
-
Track the progress of the cluster creation by watching the Red Hat OpenShift Service on AWS installation program logs. To check the logs, run the following command:
rosa logs install --cluster=<cluster_name> --watch
$ rosa logs install --cluster=<cluster_name> --watch
1 Copy to Clipboard Copied! Toggle word wrap Toggle overflow - 1
- Optional: To watch for new log messages as the installation progresses, use the
--watch
argument.
9.2.1. Expected behavior for clusters without a CNI plugin Copy linkLink copied to clipboard!
Although Red Hat OpenShift Service on AWS cluster installation is complete, the cluster cannot operate without a CNI plugin. Because the nodes are not ready, the workloads cannot deploy. For example, the Red Hat OpenShift Service on AWS cluster web console is not available, so you must use the OpenShift CLI (oc
) to log in to the cluster. Additionally, other OpenShift components such as the HAProxy-based Ingress Controller, image registry, and prometheus-based monitoring stack are not running. This is expected behavior until you install a CNI provider.
9.3. Next steps Copy linkLink copied to clipboard!
-
Install your CNI plugin. The nodes will then change from the
not ready
toready
state.