$ oc create -f <file-name>.yaml
您必须具有admin
权限。
在 OpenShift Container Platform Web 控制台中,导航到**操作符** → **OperatorHub**。
搜索文件完整性操作符,然后单击**安装**。
保留**安装模式**和**命名空间**的默认选择,以确保操作符将安装到openshift-file-integrity
命名空间。
单击**安装**。
要确认安装成功
导航到**操作符** → **已安装的操作符**页面。
检查操作符是否已安装在openshift-file-integrity
命名空间中,并且其状态为Succeeded
。
如果操作符未成功安装
导航到**操作符** → **已安装的操作符**页面,并检查状态
列中的任何错误或故障。
导航到**工作负载** → **Pod**页面,并检查openshift-file-integrity
项目中报告问题的任何 Pod 的日志。
您必须具有admin
权限。
通过运行创建Namespace
对象 YAML 文件
$ oc create -f <file-name>.yaml
apiVersion: v1
kind: Namespace
metadata:
labels:
openshift.io/cluster-monitoring: "true"
pod-security.kubernetes.io/enforce: privileged (1)
name: openshift-file-integrity
1 | 在 OpenShift Container Platform 4.17 中,pod 安全标签必须在命名空间级别设置为privileged 。 |
创建OperatorGroup
对象 YAML 文件
$ oc create -f <file-name>.yaml
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: file-integrity-operator
namespace: openshift-file-integrity
spec:
targetNamespaces:
- openshift-file-integrity
创建Subscription
对象 YAML 文件
$ oc create -f <file-name>.yaml
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: file-integrity-operator
namespace: openshift-file-integrity
spec:
channel: "stable"
installPlanApproval: Automatic
name: file-integrity-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
通过检查 CSV 文件来验证安装是否成功
$ oc get csv -n openshift-file-integrity
验证文件完整性操作符是否已启动并运行
$ oc get deploy -n openshift-file-integrity
文件完整性操作符在受限网络环境中受支持。有关更多信息,请参阅在断开连接的环境中使用 Operator Lifecycle Manager。