|
| 1 | +// Modules included in the following assemblies: |
| 2 | +// |
| 3 | +// * ingress/configure-ingress-operator.adoc |
| 4 | + |
| 5 | +:_mod-docs-content-type: PROCEDURE |
| 6 | +[id="nw-ingress-setting-update-subnet-Loadbalancerservice_{context}"] |
| 7 | += Updating the subnets on an existing Ingress Controller |
| 8 | + |
| 9 | +You can update an `IngressController` with manually specified load balancer subnets in {product-title} to avoid any disruptions, to maintain the stability of your services, and to ensure that your network configuration aligns with your specific requirements. The following procedures show you how to select and apply new subnets, verify the configuration changes, and confirm successful load balancer provisioning. |
| 10 | + |
| 11 | +[WARNING] |
| 12 | +==== |
| 13 | +This procedure may cause an outage that can last several minutes due to new DNS records propagation, new load balancers provisioning, and other factors. IP addresses and canonical names of the Ingress Controller load balancer might change after applying this procedure. |
| 14 | +==== |
| 15 | + |
| 16 | +.Procedure |
| 17 | +To update an `IngressController` with manually specified load balancer subnets, you can follow these steps: |
| 18 | + |
| 19 | +. Modify the existing IngressController to update to the new subnets. |
| 20 | ++ |
| 21 | +[source,yaml] |
| 22 | +---- |
| 23 | +apiVersion: operator.openshift.io/v1 |
| 24 | +kind: IngressController |
| 25 | +metadata: |
| 26 | + name: <name> <1> |
| 27 | + namespace: openshift-ingress-operator |
| 28 | +spec: |
| 29 | + domain: <domain> <2> |
| 30 | + endpointPublishingStrategy: |
| 31 | + type: LoadBalancerService |
| 32 | + loadBalancer: |
| 33 | + scope: External |
| 34 | + providerParameters: |
| 35 | + type: AWS |
| 36 | + aws: |
| 37 | + type: Classic <3> |
| 38 | + classicLoadBalancer: <4> |
| 39 | + subnets: |
| 40 | + ids: <5> |
| 41 | + - <updated_subnet> <6> |
| 42 | + - <updated_subnet> |
| 43 | + - <updated_subnet> |
| 44 | +---- |
| 45 | +<1> Replace `<name>` with a name for the `IngressController`. |
| 46 | +<2> Replace `<domain>` with the DNS name serviced by the `IngressController`. |
| 47 | +<3> Specify updated subnet IDs (or names if you using `names`). |
| 48 | +<4> You can also use the `networkLoadBalancer` field if using an NLB. |
| 49 | +<5> You can optionally specify a subnet by name using the `names` field instead of specifying the subnet by ID. |
| 50 | +<6> Update subnet IDs (or names if you are using `names`). |
| 51 | ++ |
| 52 | +[IMPORTANT] |
| 53 | +==== |
| 54 | +You can specify a maximum of one subnet per availability zone. Only provide public subnets for external Ingress Controllers and private subnets for internal Ingress Controllers. |
| 55 | +==== |
| 56 | + |
| 57 | +. Examine the `Progressing` condition on the `IngressController` for instructions on how to apply the subnet updates by running the following command: |
| 58 | ++ |
| 59 | +[source,terminal] |
| 60 | +---- |
| 61 | +$ oc get ingresscontroller -n openshift-ingress-operator subnets -o jsonpath="{.status.conditions[?(@.type==\"Progressing\")]}" | yq -PC |
| 62 | +---- |
| 63 | ++ |
| 64 | +.Example output |
| 65 | +[source,terminal] |
| 66 | +---- |
| 67 | +lastTransitionTime: "2024-11-25T20:19:31Z" |
| 68 | +message: 'One or more status conditions indicate progressing: LoadBalancerProgressing=True (OperandsProgressing: One or more managed resources are progressing: The IngressController subnets were changed from [...] to [...]. To effectuate this change, you must delete the service: `oc -n openshift-ingress delete svc/router-<name>`; the service load-balancer will then be deprovisioned and a new one created. This will most likely cause the new load-balancer to have a different host name and IP address and cause disruption. To return to the previous state, you can revert the change to the IngressController: [...]' |
| 69 | +reason: IngressControllerProgressing |
| 70 | +status: "True" |
| 71 | +type: Progressing |
| 72 | +---- |
| 73 | + |
| 74 | +. To apply the update, delete the service associated with the Ingress controller by running the following command: |
| 75 | + |
| 76 | +[source,terminal] |
| 77 | +---- |
| 78 | +$ oc -n openshift-ingress delete svc/router-<name> |
| 79 | +---- |
| 80 | + |
| 81 | +.Verification |
| 82 | + |
| 83 | +* To confirm that the load balancer was provisioned successfully, check the `IngressController` conditions by running the following command: |
| 84 | ++ |
| 85 | +[source,terminal] |
| 86 | +---- |
| 87 | +$ oc get ingresscontroller -n openshift-ingress-operator <name> -o jsonpath="{.status.conditions}" | yq -PC |
| 88 | +---- |
0 commit comments