|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * nodes/nodes/eco-poison-pill-operator.adoc |
| 4 | + |
| 5 | +[id="installing-poison-pill-operator-using-cli_{context}"] |
| 6 | += Installing the Poison Pill Operator by using the CLI |
| 7 | + |
| 8 | +You can use the OpenShift CLI (`oc`) to install the Poison Pill Operator. |
| 9 | + |
| 10 | +.Prerequisites |
| 11 | + |
| 12 | +* Install the OpenShift CLI (`oc`). |
| 13 | +* Log in as a user with `cluster-admin` privileges. |
| 14 | + |
| 15 | +.Procedure |
| 16 | + |
| 17 | +. Create a `Namespace` custom resource (CR) for the Poison Pill Operator: |
| 18 | +.. Define the `Namespace` CR and save the YAML file, for example, `poison-pill-namespace.yaml`: |
| 19 | ++ |
| 20 | +[source,yaml] |
| 21 | +---- |
| 22 | +apiVersion: v1 |
| 23 | +kind: Namespace |
| 24 | +metadata: |
| 25 | + name: poison-pill |
| 26 | +---- |
| 27 | +.. To create the `Namespace` CR, run the following command: |
| 28 | ++ |
| 29 | +[source,terminal] |
| 30 | +---- |
| 31 | +$ oc create -f poison-pill-namespace.yaml |
| 32 | +---- |
| 33 | + |
| 34 | +. Create an `OperatorGroup` CR: |
| 35 | +.. Define the `OperatorGroup` CR and save the YAML file, for example, `poison-pill-operator-group.yaml`: |
| 36 | ++ |
| 37 | +[source,yaml] |
| 38 | +---- |
| 39 | +apiVersion: operators.coreos.com/v1 |
| 40 | +kind: OperatorGroup |
| 41 | +metadata: |
| 42 | + name: poison-pill-manager |
| 43 | + namespace: poison-pill |
| 44 | +spec: |
| 45 | + targetNamespaces: |
| 46 | + - poison-pill |
| 47 | +---- |
| 48 | +.. To create the `OperatorGroup` CR, run the following command: |
| 49 | ++ |
| 50 | +[source,terminal] |
| 51 | +---- |
| 52 | +$ oc create -f poison-pill-operator-group.yaml |
| 53 | +---- |
| 54 | + |
| 55 | +. Create a `Subscription` CR: |
| 56 | +.. Define the `Subscription` CR and save the YAML file, for example, `poison-pill-subscription.yaml`: |
| 57 | ++ |
| 58 | +[source,yaml] |
| 59 | +---- |
| 60 | +apiVersion: operators.coreos.com/v1alpha1 |
| 61 | +kind: Subscription |
| 62 | +metadata: |
| 63 | + name: poison-pill-manager |
| 64 | + namespace: poison-pill |
| 65 | +spec: |
| 66 | + channel: alpha |
| 67 | + name: poison-pill-manager |
| 68 | + source: redhat-operators |
| 69 | + sourceNamespace: openshift-marketplace |
| 70 | + package: poison-pill-manager |
| 71 | +---- |
| 72 | +.. To create the `Subscription` CR, run the following command: |
| 73 | ++ |
| 74 | +[source,terminal] |
| 75 | +---- |
| 76 | +$ oc create -f poison-pill-subscription.yaml |
| 77 | +---- |
| 78 | + |
| 79 | +.Verification |
| 80 | + |
| 81 | +. Verify that the installation succeeded by inspecting the CSV resource: |
| 82 | ++ |
| 83 | +[source,terminal] |
| 84 | +---- |
| 85 | +$ oc get csv -n poison-pill |
| 86 | +---- |
| 87 | ++ |
| 88 | +.Example output |
| 89 | +[source,terminal] |
| 90 | +---- |
| 91 | +NAME DISPLAY VERSION REPLACES PHASE |
| 92 | +poison-pill.v0.1.4 Poison Pill Operator 0.1.4 Succeeded |
| 93 | +---- |
| 94 | + |
| 95 | +. Verify that the Poison Pill Operator is up and running: |
| 96 | ++ |
| 97 | +[source,terminal] |
| 98 | +---- |
| 99 | +$ oc get deploy -n poison-pill |
| 100 | +---- |
| 101 | ++ |
| 102 | +.Example output |
| 103 | +[source,terminal] |
| 104 | +---- |
| 105 | +NAME READY UP-TO-DATE AVAILABLE AGE |
| 106 | +poison-pill-controller-manager 1/1 1 1 10d |
| 107 | +---- |
| 108 | + |
| 109 | +. Verify that the Poison Pill Operator created the `PoisonPillConfig` CR: |
| 110 | ++ |
| 111 | +[source,terminal] |
| 112 | +---- |
| 113 | +$ oc get PoisonPillConfig -n poison-pill |
| 114 | +---- |
| 115 | ++ |
| 116 | +.Example output |
| 117 | +[source,terminal] |
| 118 | +---- |
| 119 | +NAME AGE |
| 120 | +poison-pill-config 10d |
| 121 | +---- |
| 122 | +. Verify that each poison pill pod is scheduled and running on each worker node: |
| 123 | ++ |
| 124 | +[source,terminal] |
| 125 | +---- |
| 126 | +$ oc get daemonset -n poison-pill |
| 127 | +---- |
| 128 | ++ |
| 129 | +.Example output |
| 130 | +[source,terminal] |
| 131 | +---- |
| 132 | +NAME DESIRED CURRENT READY UP-TO-DATE AVAILABLE NODE SELECTOR AGE |
| 133 | +poison-pill-ds 2 2 2 2 2 <none> 10d |
| 134 | +---- |
| 135 | ++ |
| 136 | +[NOTE] |
| 137 | +==== |
| 138 | +This command is unsupported for the control plane nodes. |
| 139 | +==== |
0 commit comments