|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * networking/external_dns_operator/nw-installing-external-dns-operator-on-cloud-providers.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="nw-installing-external-dns-operator-cli_{context}"] |
| 7 | += Installing the External DNS Operator by using the CLI |
| 8 | + |
| 9 | +You can install the External DNS Operator by using the CLI. |
| 10 | + |
| 11 | +.Prerequisites |
| 12 | + |
| 13 | +* You are logged in to the {product-title} web console as a user with `cluster-admin` permissions. |
| 14 | +
|
| 15 | +* You are logged into the OpenShift CLI (`oc`). |
| 16 | +
|
| 17 | +.Procedure |
| 18 | + |
| 19 | +. Create a `Namespace` object: |
| 20 | + |
| 21 | +.. Create a YAML file that defines the `Namespace` object: |
| 22 | ++ |
| 23 | +.Example `namespace.yaml` file |
| 24 | +[source,yaml] |
| 25 | +---- |
| 26 | +apiVersion: v1 |
| 27 | +kind: Namespace |
| 28 | +metadata: |
| 29 | + name: external-dns-operator |
| 30 | +---- |
| 31 | + |
| 32 | +.. Create the `Namespace` object by running the following command: |
| 33 | ++ |
| 34 | +[source,terminal] |
| 35 | +---- |
| 36 | +$ oc apply -f namespace.yaml |
| 37 | +---- |
| 38 | + |
| 39 | +. Create an `OperatorGroup` object: |
| 40 | + |
| 41 | +.. Create a YAML file that defines the `OperatorGroup` object: |
| 42 | ++ |
| 43 | +.Example `operatorgroup.yaml` file |
| 44 | +[source,yaml] |
| 45 | +---- |
| 46 | +apiVersion: operators.coreos.com/v1 |
| 47 | +kind: OperatorGroup |
| 48 | +metadata: |
| 49 | + name: external-dns-operator |
| 50 | + namespace: external-dns-operator |
| 51 | +spec: |
| 52 | + upgradeStrategy: Default |
| 53 | + targetNamespaces: |
| 54 | + - external-dns-operator |
| 55 | +---- |
| 56 | + |
| 57 | +.. Create the `OperatorGroup` object by running the following command: |
| 58 | ++ |
| 59 | +[source,terminal] |
| 60 | +---- |
| 61 | +$ oc apply -f operatorgroup.yaml |
| 62 | +---- |
| 63 | + |
| 64 | +. Create a `Subscription` object: |
| 65 | + |
| 66 | +.. Create a YAML file that defines the `Subscription` object: |
| 67 | ++ |
| 68 | +.Example `subscription.yaml` file |
| 69 | +[source,yaml] |
| 70 | +---- |
| 71 | +apiVersion: operators.coreos.com/v1alpha1 |
| 72 | +kind: Subscription |
| 73 | +metadata: |
| 74 | + name: external-dns-operator |
| 75 | + namespace: external-dns-operator |
| 76 | +spec: |
| 77 | + channel: stable-v1 |
| 78 | + installPlanApproval: Automatic |
| 79 | + name: external-dns-operator |
| 80 | + source: redhat-operators |
| 81 | + sourceNamespace: openshift-marketplace |
| 82 | +---- |
| 83 | + |
| 84 | +.. Create the `Subscription` object by running the following command: |
| 85 | ++ |
| 86 | +[source,terminal] |
| 87 | +---- |
| 88 | +$ oc apply -f subscription.yaml |
| 89 | +---- |
| 90 | + |
| 91 | +.Verification |
| 92 | + |
| 93 | +. Get the name of the install plan from the subscription by running the following command: |
| 94 | ++ |
| 95 | +[source,terminal] |
| 96 | +---- |
| 97 | +$ oc -n external-dns-operator \ |
| 98 | + get subscription external-dns-operator \ |
| 99 | + --template='{{.status.installplan.name}}{{"\n"}}' |
| 100 | +---- |
| 101 | + |
| 102 | +. Verify that the status of the install plan is `Complete` by running the following command: |
| 103 | ++ |
| 104 | +[source,terminal] |
| 105 | +---- |
| 106 | +$ oc -n external-dns-operator \ |
| 107 | + get ip <install_plan_name> \ |
| 108 | + --template='{{.status.phase}}{{"\n"}}' |
| 109 | +---- |
| 110 | + |
| 111 | +. Verify that the status of the `external-dns-operator` pod is `Running` by running the following command: |
| 112 | ++ |
| 113 | +[source,terminal] |
| 114 | +---- |
| 115 | +$ oc -n external-dns-operator get pod |
| 116 | +---- |
| 117 | + |
| 118 | ++ |
| 119 | +.Example output |
| 120 | +[source,terminal] |
| 121 | +---- |
| 122 | +NAME READY STATUS RESTARTS AGE |
| 123 | +external-dns-operator-5584585fd7-5lwqm 2/2 Running 0 11m |
| 124 | +---- |
| 125 | + |
| 126 | +. Verify that the catalog source of the subscription is `redhat-operators` by running the following command: |
| 127 | ++ |
| 128 | +[source,terminal] |
| 129 | +---- |
| 130 | +$ oc -n external-dns-operator get subscription |
| 131 | +---- |
| 132 | + |
| 133 | ++ |
| 134 | +.Example output |
| 135 | +[source,terminal] |
| 136 | +---- |
| 137 | +NAME PACKAGE SOURCE CHANNEL |
| 138 | +external-dns-operator external-dns-operator redhat-operators stable-v1 |
| 139 | +---- |
| 140 | + |
| 141 | +. Check the `external-dns-operator` version by running the following command: |
| 142 | ++ |
| 143 | +[source,terminal] |
| 144 | +---- |
| 145 | +$ oc -n external-dns-operator get csv |
| 146 | +---- |
| 147 | + |
| 148 | ++ |
| 149 | +.Example output |
| 150 | +[source,terminal] |
| 151 | +---- |
| 152 | +NAME DISPLAY VERSION REPLACES PHASE |
| 153 | +external-dns-operator.v<1.y.z> ExternalDNS Operator <1.y.z> Succeeded |
| 154 | +---- |
0 commit comments