$ oc create ns openshift-multiarch-tuning-operator
The Multiarch Tuning Operator is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope. |
The Multiarch Tuning Operator enhances the operational experience within multi-architecture clusters, and single-architecture clusters that are migrating to a multi-architecture compute configuration.
This Operator implements the clusterpodplacementconfigs
custom resource (CR) to support architecture-aware workload scheduling.
To enable architecture-aware workload scheduling, you must create the ClusterPodPlacementConfig
object. When you create the ClusterPodPlacementConfig
object, this Operator deploys an operand.
When a pod is created, the operand performs the following actions:
Add the multiarch.openshift.io/scheduling-gate
scheduling gate that prevents the scheduling of the pod.
Compute a scheduling predicate that includes the supported architecture values for the kubernetes.io/arch
label.
Integrate the scheduling predicate as a nodeAffinity
requirement in the pod specification.
Remove the scheduling gate from the pod.
When the operand removes the scheduling gate, the pod enters the scheduling cycle. The workload is then scheduled on nodes based on the supported architectures.
The Technology Preview version of the Multiarch Tuning Operator does not support clusters with restricted network scenarios. |
You can install the Multiarch Tuning Operator by using the OpenShift CLI (oc
).
You have installed oc
.
You have logged in to oc
as a user with cluster-admin
privileges.
Create a new project named openshift-multiarch-tuning-operator
by running the following command:
$ oc create ns openshift-multiarch-tuning-operator
Create an OperatorGroup
object:
Create a YAML file with the configuration for creating an OperatorGroup
object.
OperatorGroup
objectapiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: openshift-multiarch-tuning-operator
namespace: openshift-multiarch-tuning-operator
spec: {}
Create the OperatorGroup
object by running the following command:
$ oc create -f <file_name> (1)
1 | Replace <file_name> with the name of the YAML file that contains the OperatorGroup object configuration. |
Create a Subscription
object:
Create a YAML file with the configuration for creating a Subscription
object.
Subscription
objectapiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: openshift-multiarch-tuning-operator
namespace: openshift-multiarch-tuning-operator
spec:
channel: tech-preview
name: multiarch-tuning-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
installPlanApproval: Automatic
startingCSV: multiarch-tuning-operator.v0.9.0
Create the Subscription
object by running the following command:
$ oc create -f <file_name> (1)
1 | Replace <file_name> with the name of the YAML file that contains the Subscription object configuration. |
For more details about configuring the |
To verify that the Multiarch Tuning Operator is installed, run the following command:
$ oc get csv -n openshift-multiarch-tuning-operator
NAME DISPLAY VERSION REPLACES PHASE
multiarch-tuning-operator.v0.9.0 Multiarch Tuning Operator 0.9.0 Succeeded
The installation is successful if the Operator is in Succeeded
phase.
Optional: To verify that the OperatorGroup
object is created, run the following command:
$ oc get operatorgroup -n openshift-multiarch-tuning-operator
NAME AGE
openshift-multiarch-tuning-operator-q8zbb 133m
Optional: To verify that the Subscription
object is created, run the following command:
$ oc get subscription -n openshift-multiarch-tuning-operator
NAME PACKAGE SOURCE CHANNEL
multiarch-tuning-operator multiarch-tuning-operator multiarch-tuning-operator-catalog tech-preview
You can install the Multiarch Tuning Operator by using the OpenShift Container Platform web console.
You have access to the cluster with cluster-admin
privileges.
You have access to the OpenShift Container Platform web console.
Log in to the OpenShift Container Platform web console.
Navigate to Operators → OperatorHub.
Enter Multiarch Tuning Operator in the search field.
Click Multiarch Tuning Operator.
Select the Multiarch Tuning Operator version from the Version list.
Click Install
Set the following options on the Operator Installation page:
Set Update Channel to tech-preview.
Set Installation Mode to All namespaces on the cluster.
Set Installed Namespace to Operator recommended Namespace or Select a Namespace.
The recommended Operator namespace is openshift-multiarch-tuning-operator
. If the openshift-multiarch-tuning-operator
namespace does not exist, it is created during the operator installation.
If you select Select a namespace, you must select a namespace for the Operator from the Select Project list.
Update approval as Automatic or Manual.
If you select Automatic updates, Operator Lifecycle Manager (OLM) automatically updates the running instance of the Multiarch Tuning Operator without any intervention.
If you select Manual updates, OLM creates an update request. As a cluster administrator, you must manually approve the update request to update the Multiarch Tuning Operator to a newer version.
Optional: Select the Enable Operator recommended cluster monitoring on this Namespace checkbox.
Click Install.
Navigate to Operators → Installed Operators.
Verify that the Multiarch Tuning Operator is listed with the Status field as Succeeded in the openshift-multiarch-tuning-operator
namespace.
After installing the Multiarch Tuning Operator, you must create the ClusterPodPlacementConfig
object. When you create this object, the Multiarch Tuning Operator deploys an operand that enables architecture-aware workload scheduling.
You can create only one instance of the |
ClusterPodPlacementConfig
object configurationapiVersion: multiarch.openshift.io/v1beta1
kind: ClusterPodPlacementConfig
metadata:
name: cluster (1)
spec:
logVerbosityLevel: Normal (2)
namespaceSelector: (3)
matchExpressions:
- key: multiarch.openshift.io/exclude-pod-placement
operator: DoesNotExist
1 | You must set this field value to cluster . |
2 | Optional: You can set the field value to Normal , Debug , Trace , or TraceAll . The value is set to Normal by default. |
3 | Optional: You can configure the namespaceSelector to select the namespaces in which the Multiarch Tuning Operator’s pod placement operand must process the nodeAffinity of the pods. All namespaces are considered by default. |
In this example, the operator
field value is set to DoesNotExist
. Therefore, if the key
field value (multiarch.openshift.io/exclude-pod-placement
) is set as a label in a namespace, the operand does not process the nodeAffinity
of the pods in that namespace. Instead, the operand processes the nodeAffinity
of the pods in namespaces that do not contain the label.
If you want the operand to process the nodeAffinity
of the pods only in specific namespaces, you can configure the namespaceSelector
as follows:
namespaceSelector:
matchExpressions:
- key: multiarch.openshift.io/include-pod-placement
operator: Exists
In this example, the operator
field value is set to Exists
. Therefore, the operand processes the nodeAffinity
of the pods only in namespaces that contain the multiarch.openshift.io/include-pod-placement
label.
The namespaces starting with |
To deploy the pod placement operand that enables architecture-aware workload scheduling, you can create the ClusterPodPlacementConfig
object by using the OpenShift CLI (oc
).
You have installed oc
.
You have logged in to oc
as a user with cluster-admin
privileges.
You have installed the Multiarch Tuning Operator.
Create a ClusterPodPlacementConfig
object YAML file:
ClusterPodPlacementConfig
object configurationapiVersion: multiarch.openshift.io/v1beta1
kind: ClusterPodPlacementConfig
metadata:
name: cluster
spec:
logVerbosityLevel: Normal
namespaceSelector:
matchExpressions:
- key: multiarch.openshift.io/exclude-pod-placement
operator: DoesNotExist
Create the ClusterPodPlacementConfig
object by running the following command:
$ oc create -f <file_name> (1)
1 | Replace <file_name> with the name of the ClusterPodPlacementConfig object YAML file. |
To check that the ClusterPodPlacementConfig
object is created, run the following command:
$ oc get clusterpodplacementconfig
NAME AGE
cluster 29s
To deploy the pod placement operand that enables architecture-aware workload scheduling, you can create the ClusterPodPlacementConfig
object by using the OpenShift Container Platform web console.
You have access to the cluster with cluster-admin
privileges.
You have access to the OpenShift Container Platform web console.
You have installed the Multiarch Tuning Operator.
Log in to the OpenShift Container Platform web console.
Navigate to Operators → Installed Operators.
On the Installed Operators page, click Multiarch Tuning Operator.
Click the Cluster Pod Placement Config tab.
Select either Form view or YAML view.
Configure the ClusterPodPlacementConfig
object parameters.
Click Create.
Optional: If you want to edit the ClusterPodPlacementConfig
object, perform the following actions:
Click the Cluster Pod Placement Config tab.
Select Edit ClusterPodPlacementConfig from the options menu.
Click YAML and edit the ClusterPodPlacementConfig
object parameters.
Click Save.
On the Cluster Pod Placement Config page, check that the ClusterPodPlacementConfig
object is in the Ready
state.
You can create only one instance of the ClusterPodPlacementConfig
object. If you want to re-create this object, you must first delete the existing instance.
You can delete this object by using the OpenShift CLI (oc
).
You have installed oc
.
You have logged in to oc
as a user with cluster-admin
privileges.
Log in to the OpenShift CLI (oc
).
Delete the ClusterPodPlacementConfig
object by running the following command:
$ oc delete clusterpodplacementconfig cluster
To check that the ClusterPodPlacementConfig
object is deleted, run the following command:
$ oc get clusterpodplacementconfig
No resources found
After deleting the ClusterPodPlacementConfig
object, ensure that none of the pods are in the Pending
phase due to the SchedulingGated
reason. You can delete the scheduling gate from all of the gated pods by running the following command:
$ oc get pods -A -l multiarch.openshift.io/scheduling-gate=gated -o json | jq 'del(.items[].spec.schedulingGates[] | select(.name=="multiarch.openshift.io/scheduling-gate"))' | oc apply -f -
You can create only one instance of the ClusterPodPlacementConfig
object. If you want to re-create this object, you must first delete the existing instance.
You can delete this object by using the OpenShift Container Platform web console.
You have access to the cluster with cluster-admin
privileges.
You have access to the OpenShift Container Platform web console.
You have created the ClusterPodPlacementConfig
object.
Log in to the OpenShift Container Platform web console.
Navigate to Operators → Installed Operators.
On the Installed Operators page, click Multiarch Tuning Operator.
Click the Cluster Pod Placement Config tab.
Select Delete ClusterPodPlacementConfig from the options menu.
Click Delete.
On the Cluster Pod Placement Config page, check that the ClusterPodPlacementConfig
object has been deleted.
After deleting the ClusterPodPlacementConfig
object, ensure that none of the pods are in the Pending
phase due to the SchedulingGated
reason. You can delete the scheduling gate from all the gated pods by running the following command in the OpenShift CLI (oc
):
$ oc get pods -A -l multiarch.openshift.io/scheduling-gate=gated -o json | jq 'del(.items[].spec.schedulingGates[] | select(.name=="multiarch.openshift.io/scheduling-gate"))' | oc apply -f -
You can uninstall the Multiarch Tuning Operator by using the OpenShift CLI (oc
).
You have installed oc
.
You have logged in to oc
as a user with cluster-admin
privileges.
You deleted the ClusterPodPlacementConfig
object.
You must delete the |
Get the Subscription
object name for the Multiarch Tuning Operator by running the following command:
$ oc get subscription.operators.coreos.com -n <namespace> (1)
1 | Replace <namespace> with the name of the namespace where you want to uninstall the Multiarch Tuning Operator. |
NAME PACKAGE SOURCE CHANNEL
openshift-multiarch-tuning-operator multiarch-tuning-operator redhat-operators tech-preview
Get the currentCSV
value for the Multiarch Tuning Operator by running the following command:
$ oc get subscription.operators.coreos.com <subscription_name> -n <namespace> -o yaml | grep currentCSV (1)
1 | Replace <subscription_name> with the Subscription object name. For example: openshift-multiarch-tuning-operator . Replace <namespace> with the name of the namespace where you want to uninstall the Multiarch Tuning Operator. |
currentCSV: multiarch-tuning-operator.v0.9.0
Delete the Subscription
object by running the following command:
$ oc delete subscription.operators.coreos.com <subscription_name> -n <namespace> (1)
1 | Replace <subscription_name> with the Subscription object name. Replace <namespace> with the name of the namespace where you want to uninstall the Multiarch Tuning Operator. |
subscription.operators.coreos.com "openshift-multiarch-tuning-operator" deleted
Delete the CSV for the Multiarch Tuning Operator in the target namespace using the currentCSV
value by running the following command:
$ oc delete clusterserviceversion <currentCSV_value> -n <namespace> (1)
1 | Replace <currentCSV> with the currentCSV value for the Multiarch Tuning Operator. For example: multiarch-tuning-operator.v0.9.0 . Replace <namespace> with the name of the namespace where you want to uninstall the Multiarch Tuning Operator. |
clusterserviceversion.operators.coreos.com "multiarch-tuning-operator.v0.9.0" deleted
To verify that the Multiarch Tuning Operator is uninstalled, run the following command:
$ oc get csv -n <namespace> (1)
1 | Replace <namespace> with the name of the namespace where you have uninstalled the Multiarch Tuning Operator. |
No resources found in openshift-multiarch-tuning-operator namespace.
You can uninstall the Multiarch Tuning Operator by using the OpenShift Container Platform web console.
You have access to the cluster with cluster-admin
permissions.
You deleted the ClusterPodPlacementConfig
object.
You must delete the |
Log in to the OpenShift Container Platform web console.
Navigate to Operators → OperatorHub.
Enter Multiarch Tuning Operator in the search field.
Click Multiarch Tuning Operator.
Click the Details tab.
From the Actions menu, select Uninstall Operator.
When prompted, click Uninstall.
Navigate to Operators → Installed Operators.
On the Installed Operators page, verify that the Multiarch Tuning Operator is not listed.