Page
Install the Red Hat OpenShift Data Foundation Operator
As a first step, the ODF operator must be deployed. The steps and objects you need are listed below.
In this lesson, you will:
- Deploy the ODF operator by declaratively creating three Kubernetes objects:
- The namespace
openshift-storage. - A subscription.
- An OperatorGroup.
- The namespace
Prerequisites:
- Deploy the ODF operator.
- The namespace
openshift-storage. - A subscription.
- An OperatorGroup.
Deploy the ODF operator
This first step involves deploying the OpenShift Data Foundation (ODF) Operator by applying three essential Kubernetes YAML manifests. The code provided below declaratively defines the necessary prerequisites: the dedicated openshift-storage Namespace, an OperatorGroup, and a Subscription to the ODF Operator channel. Your task is to apply this YAML to your cluster, ideally by committing it to your GitOps repository so that Argo CD can automatically synchronize and manage the operator's installation.
Create the namespace.
apiVersion: v1
kind: Namespace
metadata:
name: "openshift-storage" # <1>
labels:
openshift.io/cluster-monitoring: "true" # <2><1> Namespace name must be openshift-storage.
<2> Optional label for the cluster monitoring.
Create the subscription.
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: "odf-operator" # <1>
namespace: "openshift-storage"
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
argocd.argoproj.io/sync-wave: "0"
spec:
channel: "stable-4.18" # <2>
installPlanApproval: "Automatic" # <3>
name: "odf-operator"
source: "redhat-operators"
sourceNamespace: "openshift-marketplace"<1> Name of the Subscription object (and also the Operator).
<2> Channel to use. For OpenShift 4.18, the channel is stable-4.18.
<3> Automatically approve the installPlan. The other option would be Manual.
Create the OperatorGroup.
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: "odf-operator"
namespace: "openshift-storage"
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
argocd.argoproj.io/sync-wave: "0"
spec:
targetNamespaces:
- openshift-storage # <1><1> Target Namespace for the operator.
Congratulations. You have now installed the operator. In the next lesson, you'll create a StorageCluster resource.