|
| 1 | +// Module included in the following assemblies: |
| 2 | +// |
| 3 | +// * networking/aws_load_balancer_operator/install-aws-load-balancer-operator.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="nw-installing-aws-load-balancer-operator-cli_{context}"] |
| 7 | += Installing the AWS Load Balancer Operator by using the CLI |
| 8 | + |
| 9 | +You can install the AWS Load Balancer 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 | +* Your cluster is configured with AWS as the platform type and cloud provider. |
| 16 | +
|
| 17 | +* You are logged into the OpenShift CLI (`oc`). |
| 18 | +
|
| 19 | +.Procedure |
| 20 | + |
| 21 | +. Create a `Namespace` object: |
| 22 | + |
| 23 | +.. Create a YAML file that defines the `Namespace` object: |
| 24 | ++ |
| 25 | +.Example `namespace.yaml` file |
| 26 | +[source,yaml] |
| 27 | +---- |
| 28 | +apiVersion: v1 |
| 29 | +kind: Namespace |
| 30 | +metadata: |
| 31 | + name: aws-load-balancer-operator |
| 32 | +---- |
| 33 | + |
| 34 | +.. Create the `Namespace` object by running the following command: |
| 35 | ++ |
| 36 | +[source,terminal] |
| 37 | +---- |
| 38 | +$ oc apply -f namespace.yaml |
| 39 | +---- |
| 40 | + |
| 41 | +. Create a `CredentialsRequest` object: |
| 42 | + |
| 43 | +.. Create a YAML file that defines the `CredentialsRequest` object: |
| 44 | ++ |
| 45 | +.Example `credentialsrequest.yaml` file |
| 46 | +[source,yaml] |
| 47 | +---- |
| 48 | +apiVersion: cloudcredential.openshift.io/v1 |
| 49 | +kind: CredentialsRequest |
| 50 | +metadata: |
| 51 | + name: aws-load-balancer-operator |
| 52 | + namespace: openshift-cloud-credential-operator |
| 53 | +spec: |
| 54 | + providerSpec: |
| 55 | + apiVersion: cloudcredential.openshift.io/v1 |
| 56 | + kind: AWSProviderSpec |
| 57 | + statementEntries: |
| 58 | + - action: |
| 59 | + - ec2:DescribeSubnets |
| 60 | + effect: Allow |
| 61 | + resource: "*" |
| 62 | + - action: |
| 63 | + - ec2:CreateTags |
| 64 | + - ec2:DeleteTags |
| 65 | + effect: Allow |
| 66 | + resource: arn:aws:ec2:*:*:subnet/* |
| 67 | + - action: |
| 68 | + - ec2:DescribeVpcs |
| 69 | + effect: Allow |
| 70 | + resource: "*" |
| 71 | + secretRef: |
| 72 | + name: aws-load-balancer-operator |
| 73 | + namespace: aws-load-balancer-operator |
| 74 | + serviceAccountNames: |
| 75 | + - aws-load-balancer-operator-controller-manager |
| 76 | +---- |
| 77 | + |
| 78 | +.. Create the `CredentialsRequest` object by running the following command: |
| 79 | ++ |
| 80 | +[source,terminal] |
| 81 | +---- |
| 82 | +$ oc apply -f credentialsrequest.yaml |
| 83 | +---- |
| 84 | + |
| 85 | +. Create an `OperatorGroup` object: |
| 86 | + |
| 87 | +.. Create a YAML file that defines the `OperatorGroup` object: |
| 88 | ++ |
| 89 | +.Example `operatorgroup.yaml` file |
| 90 | +[source,yaml] |
| 91 | +---- |
| 92 | +apiVersion: operators.coreos.com/v1 |
| 93 | +kind: OperatorGroup |
| 94 | +metadata: |
| 95 | + name: aws-lb-operatorgroup |
| 96 | + namespace: aws-load-balancer-operator |
| 97 | +spec: |
| 98 | + upgradeStrategy: Default |
| 99 | +---- |
| 100 | + |
| 101 | +.. Create the `OperatorGroup` object by running the following command: |
| 102 | ++ |
| 103 | +[source,terminal] |
| 104 | +---- |
| 105 | +$ oc apply -f operatorgroup.yaml |
| 106 | +---- |
| 107 | + |
| 108 | +. Create a `Subscription` object: |
| 109 | + |
| 110 | +.. Create a YAML file that defines the `Subscription` object: |
| 111 | ++ |
| 112 | +.Example `subscription.yaml` file |
| 113 | +[source,yaml] |
| 114 | +---- |
| 115 | +apiVersion: operators.coreos.com/v1alpha1 |
| 116 | +kind: Subscription |
| 117 | +metadata: |
| 118 | + name: aws-load-balancer-operator |
| 119 | + namespace: aws-load-balancer-operator |
| 120 | +spec: |
| 121 | + channel: stable-v1 |
| 122 | + installPlanApproval: Automatic |
| 123 | + name: aws-load-balancer-operator |
| 124 | + source: qe-app-registry |
| 125 | + sourceNamespace: openshift-marketplace |
| 126 | +---- |
| 127 | + |
| 128 | +.. Create the `Subscription` object by running the following command: |
| 129 | ++ |
| 130 | +[source,terminal] |
| 131 | +---- |
| 132 | +$ oc apply -f subscription.yaml |
| 133 | +---- |
| 134 | + |
| 135 | +.Verification |
| 136 | + |
| 137 | +. Get the name of the install plan from the subscription: |
| 138 | ++ |
| 139 | +[source,terminal] |
| 140 | +---- |
| 141 | +$ oc -n aws-load-balancer-operator \ |
| 142 | + get subscription aws-load-balancer-operator \ |
| 143 | + --template='{{.status.installplan.name}}{{"\n"}}' |
| 144 | +---- |
| 145 | + |
| 146 | +. Check the status of the install plan: |
| 147 | ++ |
| 148 | +[source,terminal] |
| 149 | +---- |
| 150 | +$ oc -n aws-load-balancer-operator \ |
| 151 | + get ip <install_plan_name> \ |
| 152 | + --template='{{.status.phase}}{{"\n"}}' |
| 153 | +---- |
| 154 | ++ |
| 155 | +The output must be `Complete`. |
0 commit comments