1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/nw-dpu-installing-operator-cli.adoc

101 lines
2.2 KiB
Plaintext

// Module included in the following assemblies:
//
// * networking/networking_operators/installing-dpu-operator.adoc
:_mod-docs-content-type: PROCEDURE
[id="nw-dpu-installing-operator-cli_{context}"]
= Installing the DPU Operator by using the CLI
As a cluster administrator, you can install the DPU Operator by using the CLI.
[NOTE]
====
The CLI must be used to install the DPU Operator on the DPU cluster.
====
.Prerequisites
* Install the OpenShift CLI (`oc`).
* An account with `cluster-admin` privileges.
.Procedure
. Create the `openshift-dpu-operator` namespace by entering the following command:
+
[source,terminal]
----
$ cat << EOF| oc create -f -
apiVersion: v1
kind: Namespace
metadata:
name: openshift-dpu-operator
annotations:
workload.openshift.io/allowed: management
EOF
----
. Create an `OperatorGroup` custom resource (CR) by entering the following command:
+
[source,terminal]
----
$ cat << EOF| oc create -f -
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: dpu-operators
namespace: openshift-dpu-operator
spec:
targetNamespaces:
- openshift-dpu-operator
EOF
----
. Create a `Subscription` CR for the DPU Operator by entering the following command:
+
[source,terminal]
----
$ cat << EOF| oc create -f -
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: openshift-dpu-operator-subscription
namespace: openshift-dpu-operator
spec:
channel: stable
name: dpu-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
EOF
----
.Verification
. To verify that the Operator is installed, enter the following command and then check that output shows `Succeeded` for the Operator:
+
[source,terminal]
----
$ oc get csv -n openshift-dpu-operator \
-o custom-columns=Name:.metadata.name,Phase:.status.phase
----
. Change to the `openshift-dpu-operator` project:
+
[source,terminal]
----
$ oc project openshift-dpu-operator
----
. Verify the DPU Operator is running by entering the following command:
+
[source,terminal]
----
$ oc get pods -n openshift-dpu-operator
----
+
.Example output
[source,terminal]
----
NAME READY STATUS RESTARTS AGE
dpu-operator-controller-manager-6b7bbb5db8-7lvkj 2/2 Running 0 2m9s
----