6.2. 安装 File Integrity Operator

6.2.1. 使用 Web 控制台安装 File Integrity Operator

先决条件

  • 您必须具有 admin 权限。

流程

  1. 在 OpenShift Container Platform Web 控制台中导航至 OperatorsOperatorHub
  2. 搜索 File Integrity Operator,然后点 Install
  3. 保留 安装模式命名空间 的默认选择,以确保将 Operator 安装到 openshift-file-integrity 命名空间中。
  4. Install

验证

确认安装成功:

  1. 导航到 OperatorsInstalled Operators 页面。
  2. 检查是否在 openshift-file-integrity 命名空间中安装 Operator,其状态为 Succeeded

如果 Operator 没有成功安装:

  1. 导航到 OperatorsInstalled Operators 页面,并检查 Status 列中是否有任何错误或故障。
  2. 导航到 WorkloadsPods 页面,检查 openshift-file-integrity 项目中报告问题的 pod 的日志。

6.2.2. 使用 CLI 安装 File Integrity Operator

先决条件

  • 您必须具有 admin 权限。

流程

  1. 运行以下命令,创建一个 Namespace 对象 YAML 文件:

    $ oc create -f <file-name>.yaml

    输出示例

    apiVersion: v1
    kind: Namespace
    metadata:
      labels:
        openshift.io/cluster-monitoring: "true"
      name: openshift-file-integrity

  2. 创建 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

  3. 创建 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: "release-0.1"
      installPlanApproval: Automatic
      name: file-integrity-operator
      source: redhat-operators
      sourceNamespace: openshift-marketplace

验证

  1. 通过检查 CSV 文件来验证安装是否成功:

    $ oc get csv -n openshift-file-integrity
  2. 验证 File Integrity Operator 是否正在运行:

    $ oc get deploy -n openshift-file-integrity

6.2.3. 其他资源