6.2. 安装 NUMA Resources Operator
NUMA Resources Operator 部署资源,供您调度 NUMA 感知工作负载和部署。您可以使用 OpenShift Container Platform CLI 或 Web 控制台安装 NUMA Resources Operator。
6.2.1. 使用 CLI 安装 NUMA Resources Operator
作为集群管理员,您可以使用 CLI 安装 Operator。
先决条件
-
安装 OpenShift CLI(
oc)。 -
以具有
cluster-admin特权的用户身份登录。
流程
为 NUMA Resources Operator 创建命名空间:
将以下 YAML 保存到
nro-namespace.yaml文件中:apiVersion: v1 kind: Namespace metadata: name: openshift-numaresources
运行以下命令来创建
NamespaceCR:$ oc create -f nro-namespace.yaml
为 NUMA Resources Operator 创建 operator 组:
在
nro-operatorgroup.yaml文件中保存以下 YAML:apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: numaresources-operator namespace: openshift-numaresources spec: targetNamespaces: - openshift-numaresources
运行以下命令来创建
OperatorGroupCR:$ oc create -f nro-operatorgroup.yaml
为 NUMA Resources Operator 创建订阅:
将以下 YAML 保存到
nro-sub.yaml文件中:apiVersion: operators.coreos.com/v1 kind: Subscription metadata: name: numaresources-operator namespace: openshift-numaresources spec: channel: "4.13" name: numaresources-operator source: redhat-operators sourceNamespace: openshift-marketplace
运行以下命令来创建
SubscriptionCR:$ oc create -f nro-sub.yaml
验证
通过检查
openshift-numaresources命名空间中的 CSV 资源来验证安装是否成功。运行以下命令:$ oc get csv -n openshift-numaresources
输出示例
NAME DISPLAY VERSION REPLACES PHASE numaresources-operator.v4.13.2 numaresources-operator 4.13.2 Succeeded
6.2.2. 使用 Web 控制台安装 NUMA Resources Operator
作为集群管理员,您可以使用 Web 控制台安装 NUMA Resources Operator。
流程
使用 OpenShift Container Platform Web 控制台安装 NUMA Resources Operator:
- 在 OpenShift Container Platform Web 控制台中,点击 Operators → OperatorHub。
- 从可用的 Operator 列表中选择 NUMA Resources Operator,然后点 Install。
可选:验证 NUMA Resources Operator 是否已成功安装:
- 切换到 Operators → Installed Operators 页面。
确保 NUMA Resources Operator 在 default 项目中列出,Status 为 InstallSucceeded。
注意在安装过程中,Operator 可能会显示 Failed 状态。如果安装过程结束后有 InstallSucceeded 信息,您可以忽略这个 Failed 信息。
如果 Operator 没有被成功安装,请按照以下步骤进行故障排除:
- 进入 Operators → Installed Operators 页面,检查 Operator Subscriptions 和 Install Plans 选项卡中的 Status 项中是否有任何错误。
-
进入 Workloads → Pods 页面,检查
default项目中的 pod 的日志。