Skip to content

Commit 3a1325e

Browse files
authored
Merge pull request #50439 from jldohmann/OSDOCS-3887
OSDOCS-3887: add ELB switching feature
2 parents 7708124 + f15d724 commit 3a1325e

File tree

4 files changed

+151
-9
lines changed

4 files changed

+151
-9
lines changed

modules/nw-aws-replacing-clb-with-nlb.adoc

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,22 @@
44

55
:_content-type: PROCEDURE
66
[id="nw-aws-replacing-clb-with-nlb_{context}"]
7-
= Replacing Ingress Controller Classic Load Balancer with Network Load Balancer
7+
= Replacing Ingress Controller Classic Load Balancer with Network Load Balancer
88

9-
You can replace an Ingress Controller that is using a Classic Load Balancer (CLB) with one that uses a Network Load Balancer (NLB) on AWS.
9+
You can replace an Ingress Controller that is using a Classic Load Balancer (CLB) with one that uses a Network Load Balancer (NLB) on AWS.
1010

1111
[WARNING]
1212
====
13-
This procedure causes an expected 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.
13+
This procedure might cause the following issues:
14+
15+
* 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.
16+
17+
* Leaked load balancer resources due to a change in the annotation of the service.
1418
====
1519

16-
.Procedure
20+
.Procedure
1721

18-
. Create a file with a new default Ingress Controller. The following example assumes that your default Ingress Controller has an `External` scope and no other customizations:
22+
. Create a file with a new default Ingress Controller. The following example assumes that your default Ingress Controller has an `External` scope and no other customizations:
1923
+
2024
.Example `ingresscontroller.yml` file
2125
[source,yaml]
@@ -36,14 +40,19 @@ spec:
3640
type: NLB
3741
type: LoadBalancerService
3842
----
39-
+
40-
If your default Ingress Controller has other customizations, ensure that you modify the file accordingly.
43+
+
44+
If your default Ingress Controller has other customizations, ensure that you modify the file accordingly.
45+
+
46+
[TIP]
47+
====
48+
If your Ingress Controller has no other customizations and you are only updating the load balancer type, consider following the procedure detailed in "Switching the Ingress Controller from using a Classic Load Balancer to a Network Load Balancer".
49+
====
4150

42-
. Force replace the Ingress Controller YAML file:
51+
. Force replace the Ingress Controller YAML file:
4352
+
4453
[source,terminal]
4554
----
4655
$ oc replace --force --wait -f ingresscontroller.yml
4756
----
4857
+
49-
Wait until the Ingress Controller is replaced. Expect serveral of minutes of outages.
58+
Wait until the Ingress Controller is replaced. Expect several of minutes of outages.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/configuring_ingress_cluster_traffic/configuring-ingress-cluster-traffic-aws.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="nw-aws-switching-clb-with-nlb_{context}"]
7+
= Switching the Ingress Controller from using a Classic Load Balancer to a Network Load Balancer
8+
9+
You can switch the Ingress Controller that is using a Classic Load Balancer (CLB) to one that uses a Network Load Balancer (NLB) on AWS.
10+
11+
Switching between these load balancers will not delete the `IngressController` object.
12+
13+
[WARNING]
14+
====
15+
This procedure might cause the following issues:
16+
17+
* 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.
18+
19+
* Leaked load balancer resources due to a change in the annotation of the service.
20+
====
21+
22+
.Procedure
23+
24+
. Modify the existing Ingress Controller that you want to switch to using an NLB. This example assumes that your default Ingress Controller has an `External` scope and no other customizations:
25+
+
26+
.Example `ingresscontroller.yaml` file
27+
[source,yaml]
28+
----
29+
apiVersion: operator.openshift.io/v1
30+
kind: IngressController
31+
metadata:
32+
creationTimestamp: null
33+
name: default
34+
namespace: openshift-ingress-operator
35+
spec:
36+
endpointPublishingStrategy:
37+
loadBalancer:
38+
scope: External
39+
providerParameters:
40+
type: AWS
41+
aws:
42+
type: NLB
43+
type: LoadBalancerService
44+
----
45+
+
46+
[NOTE]
47+
====
48+
If you do not specify a value for the `spec.endpointPublishingStrategy.loadBalancer.providerParameters.aws.type` field, the Ingress Controller uses the `spec.loadBalancer.platform.aws.type` value from the cluster `Ingress` configuration that was set during installation.
49+
====
50+
+
51+
[TIP]
52+
====
53+
If your Ingress Controller has other customizations that you want to update, such as changing the domain, consider force replacing the Ingress Controller definition file instead.
54+
====
55+
56+
. Apply the changes to the Ingress Controller YAML file by running the command:
57+
+
58+
[source,terminal]
59+
----
60+
$ oc apply -f ingresscontroller.yaml
61+
----
62+
+
63+
Expect several minutes of outages while the Ingress Controller updates.
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * networking/configuring_ingress_cluster_traffic/configuring-ingress-cluster-traffic-aws.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="nw-aws-switching-nlb-with-clb_{context}"]
7+
= Switching the Ingress Controller from using a Network Load Balancer to a Classic Load Balancer
8+
9+
You can switch the Ingress Controller that is using a Network Load Balancer (NLB) to one that uses a Classic Load Balancer (CLB) on AWS.
10+
11+
Switching between these load balancers will not delete the `IngressController` object.
12+
13+
[WARNING]
14+
====
15+
This procedure might 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.
16+
====
17+
18+
.Procedure
19+
20+
. Modify the existing Ingress Controller that you want to switch to using a CLB. This example assumes that your default Ingress Controller has an `External` scope and no other customizations:
21+
+
22+
.Example `ingresscontroller.yaml` file
23+
[source,yaml]
24+
----
25+
apiVersion: operator.openshift.io/v1
26+
kind: IngressController
27+
metadata:
28+
creationTimestamp: null
29+
name: default
30+
namespace: openshift-ingress-operator
31+
spec:
32+
endpointPublishingStrategy:
33+
loadBalancer:
34+
scope: External
35+
providerParameters:
36+
type: AWS
37+
aws:
38+
type: Classic
39+
type: LoadBalancerService
40+
----
41+
+
42+
[NOTE]
43+
====
44+
If you do not specify a value for the `spec.endpointPublishingStrategy.loadBalancer.providerParameters.aws.type` field, the Ingress Controller uses the `spec.loadBalancer.platform.aws.type` value from the cluster `Ingress` configuration that was set during installation.
45+
====
46+
+
47+
[TIP]
48+
====
49+
If your Ingress Controller has other customizations that you want to update, such as changing the domain, consider force replacing the Ingress Controller definition file instead.
50+
====
51+
52+
. Apply the changes to the Ingress Controller YAML file by running the command:
53+
+
54+
[source,terminal]
55+
----
56+
$ oc apply -f ingresscontroller.yaml
57+
----
58+
+
59+
Expect several minutes of outages while the Ingress Controller updates.

networking/configuring_ingress_cluster_traffic/configuring-ingress-cluster-traffic-aws.adoc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ toc::[]
88

99
{product-title} provides methods for communicating from outside the cluster with services running in the cluster. This method uses load balancers on AWS, specifically a Network Load Balancer (NLB) or a Classic Load Balancer (CLB). Both types of load balancers can forward the client's IP address to the node, but a CLB requires proxy protocol support, which {product-title} automatically enables.
1010

11+
There are two ways to configure an Ingress Controller to use an NLB:
12+
13+
. By force replacing the Ingress Controller that is currently using a CLB. This deletes the `IngressController` object and an outage will occur while the new DNS records propagate and the NLB is being provisioned.
14+
. By editing an existing Ingress Controller that uses a CLB to use an NLB. This changes the load balancer without having to delete and recreate the `IngressController` object.
15+
16+
Both methods can be used to switch from an NLB to a CLB.
17+
1118
You can configure these load balancers on a new or existing AWS cluster.
1219

1320
include::modules/nw-configuring-elb-timeouts-aws-classic.adoc[leveloffset=+1]
@@ -18,6 +25,10 @@ include::modules/nw-configuring-clb-timeouts.adoc[leveloffset=+2]
1825

1926
include::modules/nw-configuring-ingress-cluster-traffic-aws-networking-load-balancer.adoc[leveloffset=+1]
2027

28+
include::modules/nw-aws-switching-clb-with-nlb.adoc[leveloffset=+2]
29+
30+
include::modules/nw-aws-switching-nlb-with-clb.adoc[leveloffset=+2]
31+
2132
include::modules/nw-aws-replacing-clb-with-nlb.adoc[leveloffset=+2]
2233

2334
include::modules/nw-aws-nlb-existing-cluster.adoc[leveloffset=+2]

0 commit comments

Comments
 (0)