Installing the File Integrity Operator using the CLI

Install the File Integrity Operator from the OpenShift CLI (oc) by creating Namespace, OperatorGroup, and Subscription objects.

Prerequisites
  • You must have admin privileges.

Procedure
  1. Create a Namespace object YAML file by running:

    $ oc create -f <file_name>.yaml
    Example output
    apiVersion: v1
    kind: Namespace
    metadata:
      labels:
        openshift.io/cluster-monitoring: "true"
        pod-security.kubernetes.io/enforce: privileged
      name: openshift-file-integrity
    Note

    In Red Hat OpenShift Container Platform {product-version}, the pod security label must be set to privileged at the namespace level.

  2. Create the OperatorGroup object YAML file:

    $ oc create -f <file-name>.yaml
    Example output
    apiVersion: operators.coreos.com/v1
    kind: OperatorGroup
    metadata:
      name: file-integrity-operator
      namespace: openshift-file-integrity
    spec:
      targetNamespaces:
      - openshift-file-integrity
  3. Create the Subscription object YAML file:

    $ oc create -f <file-name>.yaml
    Example output
    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
Verification
  1. Verify the installation succeeded by inspecting the CSV file:

    $ oc get csv -n openshift-file-integrity
  2. Verify that the File Integrity Operator is up and running:

    $ oc get deploy -n openshift-file-integrity