Skip to content

Commit f8862cb

Browse files
Merge pull request #34830 from sbeskin-redhat/BZ1968377_BPG_network_traffic_migration_strategies_added_to_MTC_docs
Bz1968377: BPG network traffic migration strategies added to MTC docs
2 parents c143a5f + 16a5a29 commit f8862cb

7 files changed

+105
-34
lines changed

_topic_maps/_topic_map.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2119,7 +2119,7 @@ Topics:
21192119
- Name: Differences between OKD 3 and 4
21202120
File: planning-migration-3-4
21212121
Distros: openshift-origin
2122-
- Name: Planning considerations
2122+
- Name: Network considerations
21232123
File: planning-considerations-3-4
21242124
- Name: About MTC
21252125
File: about-mtc-3-4
@@ -2154,6 +2154,8 @@ Topics:
21542154
File: upgrading-mtc
21552155
- Name: Premigration checklists
21562156
File: premigration-checklists-mtc
2157+
- Name: Network considerations
2158+
File: network-considerations-mtc
21572159
- Name: Migrating your applications
21582160
File: migrating-applications-with-mtc
21592161
- Name: Advanced migration options
Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
11
[id="planning-considerations-3-4"]
2-
= Planning considerations
2+
= Network considerations
33
include::modules/common-attributes.adoc[]
44
:context: planning-considerations-3-4
55

66
toc::[]
77

8-
This section describes considerations and strategies for planning your migration from {product-title} 3 to 4.
8+
Review the strategies for redirecting your application network traffic after migration.
99

10-
include::modules/migration-DNS-considerations.adoc[leveloffset=+1]
11-
include::modules/migration-isolating-dns-domain-of-target-cluster-from-clients.adoc[leveloffset=+1]
12-
include::modules/migration-setting-up-target-cluster-to-accept-source-dns-domain.adoc[leveloffset=+1]
10+
[id="dns-considerations_{context}"]
11+
== DNS considerations
12+
13+
The DNS domain of the target cluster is different from the domain of the source cluster. By default, applications get FQDNs of the target cluster after migration.
14+
15+
To preserve the source DNS domain of migrated applications, select one of the two options described below.
16+
17+
include::modules/migration-isolating-dns-domain-of-target-cluster-from-clients.adoc[leveloffset=+2]
18+
include::modules/migration-setting-up-target-cluster-to-accept-source-dns-domain.adoc[leveloffset=+2]
1319

1420
.Additional resources
1521

1622
* See xref:../security/certificates/replacing-default-ingress-certificate.adoc#replacing-default-ingress[Replacing the default ingress certificate] for more information.
23+
24+
include::modules/migration-network-traffic-redirection-strategies.adoc[leveloffset=+1]
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
[id="network-considerations-mtc"]
2+
= Network considerations
3+
include::modules/common-attributes.adoc[]
4+
:context: network-considerations-mtc
5+
6+
toc::[]
7+
8+
Review the strategies for redirecting your application network traffic after migration.
9+
10+
[id="dns-considerations_{context}"]
11+
== DNS considerations
12+
13+
The DNS domain of the target cluster is different from the domain of the source cluster. By default, applications get FQDNs of the target cluster after migration.
14+
15+
To preserve the source DNS domain of migrated applications, select one of the two options described below.
16+
17+
include::modules/migration-isolating-dns-domain-of-target-cluster-from-clients.adoc[leveloffset=+2]
18+
include::modules/migration-setting-up-target-cluster-to-accept-source-dns-domain.adoc[leveloffset=+2]
19+
20+
.Additional resources
21+
22+
* See xref:../security/certificates/replacing-default-ingress-certificate.adoc#replacing-default-ingress[Replacing the default ingress certificate] for more information.
23+
24+
include::modules/migration-network-traffic-redirection-strategies.adoc[leveloffset=+1]

modules/migration-DNS-considerations.adoc

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
// Module included in the following assemblies:
22
//
33
// * migrating_from_ocp_3_to_4/planning-considerations-3-4.adoc
4+
// * migration_toolkit_for_containers/network-considerations-mtc.adoc
45

5-
[id="isolating-dns-domain-of-target-cluster-from-clients_{context}"]
6-
== Isolating the DNS domain of the target cluster from the clients
6+
[id="migration-isolating-dns-domain-of-target-cluster-from-clients_{context}"]
7+
= Isolating the DNS domain of the target cluster from the clients
78

89
You can allow the clients' requests sent to the DNS domain of the source cluster to reach the DNS domain of the target cluster without exposing the target cluster to the clients.
910

1011
.Procedure
11-
. Place an exterior network component, such as an application load balancer or a reverse proxy, between the clients and the OpenShift Container Platform 4 cluster.
1212

13-
. Update the original application FQDN (`app1.apps.ocp3.example.com`) in the DNS server to return the IP address of the exterior network component.
13+
. Place an exterior network component, such as an application load balancer or a reverse proxy, between the clients and the target cluster.
1414

15-
. Configure the network component to send requests received for the application in the source domain to the load balancer in the target {product-title} 4 cluster domain.
15+
. Update the application FQDN on the source cluster in the DNS server to return the IP address of the exterior network component.
1616

17-
. Create a wildcard DNS record for the `*.apps.ocp3.example.com` domain that points to the IP address of the load balancer of the source cluster.
17+
. Configure the network component to send requests received for the application in the source domain to the load balancer in the target cluster domain.
1818

19-
. Create a specific DNS record for each application that points to the IP address of the exterior network component in front of the target cluster. A specific DNS record has higher priority than a wildcard record, so no conflict arises when the application FQDN is resolved.
19+
. Create a wildcard DNS record for the `*.apps.source.example.com` domain that points to the IP address of the load balancer of the source cluster.
20+
21+
. Create a DNS record for each application that points to the IP address of the exterior network component in front of the target cluster. A specific DNS record has higher priority than a wildcard record, so no conflict arises when the application FQDN is resolved.
2022

2123
[NOTE]
2224
====
23-
* The exterior network component must terminate all secure TLS connections. If the connections pass through to the {product-title} 4 load balancer, the FQDN of the target application is exposed to the client and certificate errors occur.
25+
* The exterior network component must terminate all secure TLS connections. If the connections pass through to the target cluster load balancer, the FQDN of the target application is exposed to the client and certificate errors occur.
2426
2527
* The applications must not return links referencing the target cluster domain to the clients. Otherwise, parts of the application might not load or work properly.
2628
====
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * migrating_from_ocp_3_to_4/planning-considerations-3-4.adoc
4+
// * migration_toolkit_for_containers/network-considerations-mtc.adoc
5+
6+
[id="migration-network-traffic-redirection-strategies_{context}"]
7+
= Network traffic redirection strategies
8+
9+
After a successful migration, you must redirect network traffic of your stateless applications from the source cluster to the target cluster.
10+
11+
The strategies for redirecting network traffic are based on the following assumptions:
12+
13+
* The application pods are running on both the source and target clusters.
14+
* Each application has a route that contains the source cluster hostname.
15+
* The route with the source cluster hostname contains a CA certificate.
16+
* For HTTPS, the target router CA certificate contains a Subject Alternative Name for the wildcard DNS record of the source cluster.
17+
18+
Consider the following strategies and select the one that meets your objectives.
19+
20+
* Redirecting all network traffic for all applications at the same time
21+
+
22+
Change the wildcard DNS record of the source cluster to point to the target cluster router's virtual IP address (VIP).
23+
+
24+
This strategy is suitable for simple applications or small migrations.
25+
26+
* Redirecting network traffic for individual applications
27+
+
28+
Create a DNS record for each application with the source cluster hostname pointing to the target cluster router's VIP. This DNS record takes precedence over the source cluster wildcard DNS record.
29+
30+
* Redirecting network traffic gradually for individual applications
31+
32+
. Create a proxy that can direct traffic to both the source cluster router's VIP and the target cluster router's VIP, for each application.
33+
. Create a DNS record for each application with the source cluster hostname pointing to the proxy.
34+
. Configure the proxy entry for the application to route a percentage of the traffic to the target cluster router's VIP and the rest of the traffic to the source cluster router's VIP.
35+
. Gradually increase the percentage of traffic that you route to the target cluster router's VIP until all the network traffic is redirected.
36+
37+
* User-based redirection of traffic for individual applications
38+
+
39+
Using this strategy, you can filter TCP/IP headers of user requests to redirect network traffic for predefined groups of users. This allows you to test the redirection process on specific populations of users before redirecting the entire network traffic.
40+
41+
. Create a proxy that can direct traffic to both the source cluster router's VIP and the target cluster router's VIP, for each application.
42+
. Create a DNS record for each application with the source cluster hostname pointing to the proxy.
43+
. Configure the proxy entry for the application to route traffic matching a given header pattern, such as `test customers`, to the target cluster router's VIP and the rest of the traffic to the source cluster router's VIP.
44+
. Redirect traffic to the target cluster router's VIP in stages until all the traffic is on the target cluster router's VIP.
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,35 @@
11
// Module included in the following assemblies:
22
//
33
// * migrating_from_ocp_3_to_4/planning-considerations-3-4.adoc
4+
// * migration_toolkit_for_containers/network-considerations-mtc.adoc
45

5-
[id="setting-up-target-cluster-to-accept-source-dns-domain_{context}"]
6-
== Setting up the target cluster to accept the source DNS domain
6+
[id="migration-setting-up-target-cluster-to-accept-source-dns-domain_{context}"]
7+
= Setting up the target cluster to accept the source DNS domain
78

8-
You can set up the target cluster to accept requests for migrated applications in the DNS domain of the source cluster.
9+
You can set up the target cluster to accept requests for a migrated application in the DNS domain of the source cluster.
910

1011
.Procedure
1112

1213
For both non-secure HTTP access and secure HTTPS access, perform the following steps:
1314

14-
. Create a route in the application’s project for the hostname that applications used in the source cluster:
15+
. Create a route in the target cluster's project that is configured to accept requests addressed to the application's FQDN in the source cluster:
1516
+
1617
[source,terminal]
1718
----
18-
$ oc expose svc app1-svc --hostname app1.apps.ocp3.example.com \
19-
-n app1-namespace
19+
$ oc expose svc <app1-svc> --hostname <app1.apps.source.example.com> \
20+
-n <app1-namespace>
2021
----
2122
+
2223
With this new route in place, the server accepts any request for that FQDN and sends it to the corresponding application pods.
23-
In addition, when you migrate the application, another route is created in the target cluster domain (`app1.apps.ocp4.example.com`). Requests can reach the migrated application using both of these hostnames.
24+
In addition, when you migrate the application, another route is created in the target cluster domain. Requests reach the migrated application using either of these hostnames.
2425

25-
. Create a specific DNS record for the FQDN in the route hostname parameter that points to the IP address of the default load balancer of the target cluster. Specific DNS records take priority over wildcard records.
26+
. Create a DNS record with your DNS provider that points the application's FQDN in the source cluster to the IP address of the default load balancer of the target cluster. This will redirect traffic away from your source cluster to your target cluster.
2627
+
2728
The FQDN of the application resolves to the load balancer of the target cluster. The default ingress controller router accept requests for that FQDN because a route for that hostname is exposed.
2829

2930
For secure HTTPS access, perform the following additional step:
3031

3132
. Replace the x509 certificate of the default ingress controller created during the installation process with a custom certificate.
3233
. Configure this certificate to include the wildcard DNS domains for both the source and target clusters in the `subjectAltName` field.
33-
+
34-
The new certificate is valid for securing connections made using either of the two DNS domains.
34+
+
35+
The new certificate is valid for securing connections made using either DNS domain.

0 commit comments

Comments
 (0)