|
| 1 | +// Modules included in the following assemblies: |
| 2 | +// |
| 3 | +// * networking/load-balancing-openstack.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="nw-osp-specify-floating-ip_{context}"] |
| 7 | += Specifying a floating IP address in the Ingress Controller |
| 8 | + |
| 9 | +By default, a floating IP address gets randomly assigned to your {product-title} cluster on {rh-openstack-first} upon deployment. This floating IP address is associated with your Ingress port. |
| 10 | + |
| 11 | +You might want to pre-create a floating IP address before updating your DNS records and cluster deployment. In this situation, you can define a floating IP address to the Ingress Controller. You can do this regardless of whether you are using Octavia or a user-managed cluster. |
| 12 | + |
| 13 | +.Procedure |
| 14 | + |
| 15 | +. Create the Ingress Controller custom resource (CR) file with the floating IPs: |
| 16 | ++ |
| 17 | +.Example Ingress config `sample-ingress.yaml` |
| 18 | +[source,yaml] |
| 19 | +---- |
| 20 | +apiVersion: operator.openshift.io/v1 |
| 21 | +kind: IngressController |
| 22 | +metadata: |
| 23 | + namespace: openshift-ingress-operator |
| 24 | + name: <name> <1> |
| 25 | +spec: |
| 26 | + domain: <domain> <2> |
| 27 | + endpointPublishingStrategy: |
| 28 | + type: LoadBalancerService |
| 29 | + loadBalancer: |
| 30 | + scope: External <3> |
| 31 | + providerParameters: |
| 32 | + type: OpenStack |
| 33 | + openstack: |
| 34 | + floatingIP: <ingress_port_IP> <4> |
| 35 | +---- |
| 36 | +<1> The name of your Ingress Controller. If you are using the default Ingress Controller, the value for this field is `default`. |
| 37 | +<2> The DNS name serviced by the Ingress Controller. |
| 38 | +<3> You must set the scope to `External` to use a floating IP address. |
| 39 | +<4> The floating IP address associated with the port your Ingress Controller is listening on. |
| 40 | + |
| 41 | +. Apply the CR file by running the following command: |
| 42 | ++ |
| 43 | +[source,terminal] |
| 44 | +---- |
| 45 | +$ oc apply -f sample-ingress.yaml |
| 46 | +---- |
| 47 | + |
| 48 | +. Update your DNS records with the Ingress Controller endpoint: |
| 49 | ++ |
| 50 | +[source,text] |
| 51 | +---- |
| 52 | +*.apps.<name>.<domain>. IN A <ingress_port_IP> |
| 53 | +---- |
| 54 | +
|
| 55 | +. Continue with creating your {product-title} cluster. |
| 56 | +
|
| 57 | +.Verification |
| 58 | +
|
| 59 | +* Confirm that the load balancer was successfully provisioned by checking the `IngressController` conditions using the following command: |
| 60 | ++ |
| 61 | +[source,terminal] |
| 62 | +---- |
| 63 | +$ oc get ingresscontroller -n openshift-ingress-operator <name> -o jsonpath="{.status.conditions}" | yq -PC |
| 64 | +---- |
0 commit comments