Using Arm Hosted Control Planes on AWS to Reduce OpenShift Costs
Are you trying to manage your control planes at a lower cost? Are you trying to lessen the workload associated with controlling many control planes? Red Hat OpenShift’s Hosted Control Plans (also known as HyperShift) enable massive OpenShift tenant cluster hosting via Amazon Web Services (AWS). The control plane is spread among three machine nodes in each standalone OpenShift cluster. Hosted Control Planes, on the other hand, schedule the control plane as pods on available worker nodes, just like any other workload. This makes clusters more economical while still allowing the reuse of OpenShift tenancy primitives like projects, policies, etc. by enabling the creation and execution of several control planes on fewer nodes. Using Arm Hosted Control Planes on AWS can potentially increase cost savings while using hosted control planes can cut costs.
You may swiftly deploy several Arm Hosted control planes with 64-bit x86 NodePools by installing Arm Hosted control planes on top of existing 64-bit Arm OpenShift Container Platform (OCP) cluster settings. All of this may be done on the AWS platform, which presents the possibility of cost savings through the use of Arm Hosted control planes. This article will look at the advantages and setup procedures for deploying an Arm hosted control plane.
Please be aware that this feature is currently in technical preview (TP) and will receive formal support in a subsequent release.
Benefits
Additional advantages of using Arm hosted control planes over traditional OCP clusters include:
- Comparing Arm Hosted control planes to an analogous x86 hosted control plane, expenditures might be cut by about 20%. Savings based on m6i.xlarge (x86 based) vs. m6g.xlarge (Arm based) per hour costs
- Decreased maintenance
- Borders between management and workloads that are more secure
- Run numerous control planes on fewer nodes to lower the cost of clusters.
- Quicker control plane setup times
- Simplifies and centralizes multicluster management
The documentation for the hosted control plane overview has more information on the advantages of hosted clusters.
Cluster Preparation
A 64-bit Arm OCP cluster hosted on AWS is currently using OCP 4.13.0 as its base operating system.
- Put in the multicluster engine operator, version 2.2.4 or more recent. You may find the installation instructions for this operator here.
- Then, set up an AWS S3 bucket and S3 OIDC secret by following the instructions in step 1.7.1.2, “Creating the Amazon Web Services S3 bucket and S3 OIDC secret.”
Execute the following command after step 1
aws s3api put-bucket-ownership-controls --bucket $BUCKET_NAME --ownership-controls="Rules=[{ObjectOwnership=BucketOwnerPreferred}]"
- Next, activate hosted control planes by following the instructions in section 1.7.1.6, “Enabling the hosted control planes feature.”
- Get the Hypershift cli version 1.7.1.7 now. The Hosted Control Plane CLI installation
Demo
In the parts that follow, each step will be explained:
- Environment Variables Configuration
- Constructing a 64-bit x86 guest cluster and an Arm hosted control plane
- A Second 64-bit x86 Guest Cluster is Added to the Current Arm Hosted Control Plane
- Deleting a control plane hosted by the arm
Environment Variables Configuration
To install the Arm HyperShift Operator and establish the hosted control plane cluster, first set up the environment variables required by the HyperShift command line tool. This immediately comes after step 1 in 1.7.2.3. establishing an AWS hosted cluster.
The Red Hat OpenShift Cluster Manager will be able to provide you with the image pull secret.
REGION=us-east-1 AWS_CREDS=~/.aws/credentials BASE_DOMAIN=my.base.domain.com PULL_SECRET=~/all-the-pull-secrets.json BUCKET_NAME=my-s3-bucket CLUSTER_NAME=my-hypershift-arm-cluster NODEPOOL_NAME=my-additional-x86-guest-cluster NODEPOOL_REPLICAS=2
Set your OpenShift 64-bit Arm management cluster as the target of the KUBECONFIG environment variable.
$ hypershift % export KUBECONFIG=/Users/user/aws-oc-nightly/auth/kubeconfig
Creating an Arm Hosted Control Plane and 64-bit x86 Guest Cluster
- After that, build a hosted control plane with a starting guest cluster of two nodes, altering the default release image to use a multi-architecture release image as the management cluster is 64-bit Arm and the hosted control plane guest clusters are 64-bit x86. This guarantees that the hosted and guest clusters are created with the proper bootstrapping settings.
Deploying a hosted cluster on AWS comes immediately after step 4 in 1.7.2.3.
$ hypershift create cluster aws \ --name $CLUSTER_NAME \ --node-pool-replicas=$NODEPOOL_REPLICAS \ --base-domain $BASE_DOMAIN \ --pull-secret $PULL_SECRET \ --aws-creds $AWS_CREDS \ --region $REGION \ --release-image quay.io/openshift-release-dev/ocp-release:4.13.0-multi
2. Employ the OpenShift command line tool to confirm the creation of the guest cluster went smoothly.
$ oc get nodepools --namespace clusters NAME CLUSTER DESIRED NODES CURRENT NODES AUTOSCALING AUTOREPAIR VERSION UPDATINGVERSION UPDATINGCONFIG MESSAGE my-hypershift-arm-cluster-us-east-1a my-hypershift-arm-cluster 2 2 False False 4.13.0
3. Confirm that the hosted control plane was successfully created.
$ oc get --namespace clusters hostedclusters NAME VERSION KUBECONFIG PROGRESS AVAILABLE PROGRESSING MESSAGE my-hypershift-arm-cluster 4.13.0 my-hypershift-arm-cluster-admin-kubeconfig Completed True False The hosted control plane is available
4. Create a KUBECONFIG to browse to the new guest cluster and that the AWS machines are in the guest cluster after the guest cluster and hosted control plane have been successfully constructed.
A Second 64-bit x86 Guest Cluster is Added to the Current Arm Hosted Control Plane
Additionally, you can expand the hosted control plane’s guest clusters as necessary by using the HyperShift command-line tool.
$ hypershift create nodepool aws \
–cluster-name $CLUSTER_NAME \
–name $NODEPOOL_NAME \
–node-count=$NODEPOOL_REPLICAS
NodePool my-additional-x86-guest-cluster created
In order to confirm that the new guest cluster was initially initialized properly, use the OpenShift command line tool command.
$ oc get nodepools --namespace clusters NAME CLUSTER DESIRED NODES CURRENT NODES AUTOSCALING AUTOREPAIR VERSION UPDATINGVERSION UPDATINGCONFIG MESSAGE my-additional-x86-guest-cluster my-hypershift-arm-cluster 2 2 False False 4.13.0 my-hypershift-arm-cluster-us-east-1a my-hypershift-arm-cluster 2 2 False False 4.13.0
Deleting a control plane hosted by the arm
Run the command listed below to remove the Arm-hosted control plane. This immediately comes after step 1 in 1.7.2.6. it is destroying a cluster that is hosted by AWS.
$ hypershift destroy cluster aws \ --name $CLUSTER_NAME \ --aws-creds $AWS_CREDS
Summary
With a 64-bit x86 tenant cluster, we showed how to deploy and verify an Arm Hosted control plane. We also showed how to install the Arm HyperShift operator using the HyperShift command line tool, created a second 64-bit x86 tenant cluster using the same Arm hosted control plane, verified the success of the 64-bit x86 tenant cluster creation, proved the success of the Arm hosted control plane creation and deleted the Arm hosted control plane.
Future Work
Future work will increase the hosted control planes’ multi-architecture CPU capabilities. The following feature to be added is the ability to create 64-bit Arm NodePools on AWS. This feature enables the operation of 64-bit x86 and 64-bit Arm NodePools from a single hosted control plane (notice that mixing CPU architectures within a NodePool is not possible).
We will eventually add 64-bit Arm Hosted control planes and 64-bit Arm NodePools to other on-premises and cloud providers after the 64-bit Arm NodePools on AWS.