Skip to content

Commit 794762c

Browse files
committed
OSDOCS-16862: CQA2.0 of CORE-3: Ingress Controllers and Load Balancing Overview
1 parent 3a206ee commit 794762c

File tree

7 files changed

+70
-76
lines changed

7 files changed

+70
-76
lines changed

modules/configuration-externalip.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
[id="configuration-externalip_{context}"]
77
= Configuration for ExternalIP
88

9-
The following parameters in the `Network.config.openshift.io` custom resource (CR) govern the use of an external IP address in {product-title}:
9+
[role="_abstract"]
10+
You can set parameters in the `Network.config.openshift.io` custom resource (CR) to govern the use of an external IP address in {product-title}. These parameters are listed as follows:
1011

1112
* `spec.externalIP.autoAssignCIDRs` defines an IP address block used by the load balancer when choosing an external IP address for the service. {product-title} supports only a single IP address block for automatic assignment. This configuration requires less steps than manually assigning ExternalIPs to services, which requires managing the port space of a limited number of shared IP addresses. If you enable automatic assignment, the Cloud Controller Manager Operator allocates an external IP address to a `Service` object with `spec.type=LoadBalancer` defind in its configuration.
1213

modules/nw-allocate-load-balancers-to-subnets-procedure.adoc

Lines changed: 52 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,43 @@
66
[id="nw-allocating-load-balancers-to-subnets-procedure_{context}"]
77
= Specifying AWS subnets for OpenShift API and ingress load balancers at installation
88

9-
Perform the following steps to allocate API and ingress load balancers to specific subnets.
9+
[role="_abstract"]
10+
You can allocate API and ingress load balancers to specific subnets.
1011

11-
.Prerequisites
12+
When defining entries for control plane load balancers in the `subnets` list, ensure that you adhere to the following pattern:
13+
+
14+
[source,yaml]
15+
----
16+
# ... (within platform.aws.vpc.subnets list)
17+
- id: subnet-0fcf8e0392f0910d6 # Public Subnet for External API LB
18+
roles:
19+
- type: ControlPlaneExternalLB
20+
- id: subnet-0fcf8e0392f0910d7 # Private Subnet for Internal API LB
21+
roles:
22+
- type: ControlPlaneInternalLB
23+
# ...
24+
----
1225

13-
Before you begin, ensure you have:
26+
For the default public Ingress Controller, any subnet assigned the `IngressControllerLB` role in your `install-config.yaml` file must be a public subnet. For example, the subnet must have a route table entry in AWS that directs outbound traffic to an internet gateway (IGW). Ensure you list all necessary subnets, public and private across the AZs, and assign them appropriate roles according to your cluster architecture.
1427

15-
* An existing AWS virtual private cloud (VPC).
28+
Subnet IDs define the subnets in an existing VPC and can optionally specify their intended roles. If no roles are specified on any subnet, the subnet roles are decided automatically. In this case, the VPC must not contain any other non-cluster subnets without the `kubernetes.io/cluster/<cluster-id>` tag.
1629

17-
* Pre-configured AWS subnets intended for use by the OpenShift cluster, with the following considerations:
30+
If roles are specified for subnets, each subnet must have at least one assigned role, and the `ClusterNode`, `BootstrapNode`, `IngressControllerLB`, `ControlPlaneExternalLB`, and `ControlPlaneInternalLB` roles must be assigned to at least one subnet. However, if the cluster scope is internal, `ControlPlaneExternalLB` is not required.
1831

19-
** You have a list of their subnet IDs (for example, `subnet-0123456789abcdef0`). These IDs will be used in the `install-config.yaml` file.
32+
.Prerequisites
2033

34+
* An existing AWS virtual private cloud (VPC).
35+
* Pre-configured AWS subnets intended for use by the OpenShift cluster, with the following considerations:
36+
** You have a list of their subnet IDs (for example, `subnet-0123456789abcdef0`). These IDs will be used in the `install-config.yaml` file.
2137
** Use subnets spanning at least two availability zones (AZs) for high availability of load balancers and other critical components, like control planes.
22-
2338
** You have sufficient available IP addresses within these subnets for all assigned roles.
24-
2539
** The AWS configuration for these subnets, including network ACLs and security groups, must permit necessary traffic for all roles assigned to them. For subnets hosting an ingress controller, this typically includes TCP ports 80 and 443 from required sources.
26-
2740
* You have the OpenShift installer binary for your target OpenShift version.
28-
2941
* You have an `install-config.yaml` file.
3042
3143
.Procedure
3244

33-
. Prepare the `install-config.yaml` file:
34-
+
35-
If you haven't already, generate the installation configuration file using the OpenShift installer:
45+
. Generate the installation configuration file by using the {product-title} installation program by entering the following command:
3646
+
3747
[source,terminal]
3848
----
@@ -41,84 +51,63 @@ $ openshift-install create install-config --dir=<your_installation_directory>
4151
+
4252
This command creates the `install-config.yaml` file in the specified directory.
4353

44-
. Define subnets and assign roles:
45-
+
46-
Open the `install-config.yaml` file located in `<your_installation_directory>` using a text editor. You will define your VPC subnets and their designated roles under the `platform.aws.vpc.subnets` field.
47-
+
48-
For each AWS subnet you intend the cluster to use, you will create an entry specifying its `id` and a list of `roles`. Each role is an object with a `type` key. To designate a subnet for the default Ingress Controller, assign it a role with `type: IngressControllerLB`.
54+
. Open the `install-config.yaml` file located in `<your_installation_directory>` by using a text editor.
55+
56+
. Define subnets and assign roles. You must define your VPC subnets and their designated roles under the `platform.aws.vpc.subnets` parameter. For each AWS subnet, create an entry by specifying an `id` and a list of `roles`. Each role is an object with a `type` key. To designate a subnet for the default Ingress Controller, assign a role with `type: IngressControllerLB` to the subnet.
4957
+
5058
[source,yaml]
5159
----
5260
apiVersion: v1
53-
baseDomain: example.com <1>
61+
baseDomain: example.com
5462
metadata:
5563
name: my-cluster # Example cluster name
5664
platform:
5765
aws:
58-
region: us-east-1 <2>
59-
vpc: <3>
60-
subnets: <4>
61-
- id: subnet-0fcf8e0392f0910d5 # Public Subnet in AZ us-east-1a <5>
66+
region: us-east-1
67+
vpc:
68+
subnets:
69+
- id: subnet-0fcf8e0392f0910d5 # Public Subnet in AZ us-east-1a
6270
roles:
63-
- type: IngressControllerLB <6>
71+
- type: IngressControllerLB
6472
- type: BootstrapNode
6573
- id: subnet-0xxxxxxxxxxxxxxza # Public Subnet in another AZ for HA
6674
roles:
6775
- type: IngressControllerLB
6876
- id: subnet-0fcf8e0392f0910d4 # Private Subnet in AZ us-east-1a
6977
roles:
70-
- type: ClusterNode <7>
78+
- type: ClusterNode
7179
- id: subnet-0yyyyyyyyyyyyyyzb # Private Subnet in another AZ for HA
7280
roles:
7381
- type: ClusterNode
7482
# Add other subnet IDs and their roles as needed for your cluster architecture
75-
pullSecret: '...' <8>
76-
sshKey: '...' <9>
83+
pullSecret: '...'
84+
sshKey: '...'
7785
----
78-
<1> Your base domain.
79-
<2> Your AWS region.
80-
<3> The vpc object under `platform.aws` contains the subnets list.
81-
<4> List of all subnet objects that OpenShift will use. Each object defines a subnet id and its roles.
82-
<5> Replace with your AWS Subnet ID.
83-
<6> The `type: IngressControllerLB` role specifically designates this subnet for the default Ingress Controller's LoadBalancer. In private/internal cluster, the subnet with `IngressControllerLB` role must be private.
84-
<7> The `type: ClusterNode` role designates this subnet for control plane and compute nodes. These are typically private subnets.
85-
<8> Your pull secret.
86-
<9> Your SSH key.
8786
+
88-
Entries for control plane load balancers in the `subnets` list would follow a similar pattern:
87+
where:
8988
+
90-
[source,yaml]
91-
----
92-
# ... (within platform.aws.vpc.subnets list)
93-
- id: subnet-0fcf8e0392f0910d6 # Public Subnet for External API LB
94-
roles:
95-
- type: ControlPlaneExternalLB
96-
- id: subnet-0fcf8e0392f0910d7 # Private Subnet for Internal API LB
97-
roles:
98-
- type: ControlPlaneInternalLB
99-
# ...
100-
----
101-
+
102-
For the default public Ingress Controller, any subnet assigned the `IngressControllerLB` role in your `install-config.yaml` file must be a public subnet. For example, it must have a route table entry in AWS that directs outbound traffic to an internet gateway (IGW).
103-
+
104-
Ensure you list all necessary subnets, public and private across the AZs, and assign them appropriate roles according to your cluster architecture.
105-
+
106-
Subnet IDs define the subnets in an existing VPC and can optionally specify their intended roles. If no roles are specified on any subnet, the subnet roles are decided automatically. In this case, the VPC must not contain any other non-cluster subnets without the `kubernetes.io/cluster/<cluster-id>` tag.
107-
+
108-
If roles are specified for subnets, each subnet must have at least one assigned role, and the `ClusterNode`, `BootstrapNode`, `IngressControllerLB`, `ControlPlaneExternalLB`, and `ControlPlaneInternalLB` roles must be assigned to at least one subnet. However, if the cluster scope is internal, `ControlPlaneExternalLB` is not required.
109-
110-
. Proceed with the cluster Installation:
111-
+
112-
After saving your changes to the `install-config.yaml` file, create the cluster:
89+
`baseDomain`:: Your base domain.
90+
`region`:: Your AWS region.
91+
`vpc`:: The vpc object under `platform.aws` contains the subnets list.
92+
`subnets`:: List of all subnet objects that OpenShift will use. Each object defines a subnet id and its roles.
93+
`id`:: Replace with your AWS Subnet ID.
94+
`type.IngressControllerLB`:: The `type: IngressControllerLB` role specifically designates this subnet for the default Ingress Controller's LoadBalancer. In private/internal cluster, the subnet with `IngressControllerLB` role must be private.
95+
`type.ClusterNode`:: The `type: ClusterNode` role designates this subnet for control plane and compute nodes. These are typically private subnets.
96+
`pullSecret`:: Your pull secret.
97+
`sshKey`:: Your SSH key.
98+
99+
. Save you changes to the `install-config.yaml` file.
100+
101+
. Install the cluster by running the following command:
113102
+
114103
[source,terminal]
115104
----
116105
$ openshift-install create cluster --dir=<your_installation_directory>
117106
----
118107
+
119-
The installation program will now use the subnet definitions and explicit role assignments from the `platform.aws.vpc.subnets` section of your `install-config.yaml` file to provision cluster resources, including placing the Ingress Controller's LoadBalancer in the subnets you designated with the `IngressControllerLB` role.
120-
108+
The installation program uses the subnet definitions and explicit role assignments from the `platform.aws.vpc.subnets` section of your `install-config.yaml` file to provision cluster resources. This includes placing the LoadBalancer of the Ingress Controller in the subnets you designated with the `IngressControllerLB` role.
109+
+
121110
[NOTE]
122111
====
123112
The role assignment mechanism within `platform.aws.vpc.subnets`, such as specifying types like `IngressControllerLB`, `ClusterNode`, `ControlPlaneExternalLB`, `ControlPlaneInternalLB`, `BootstrapNode` is the comprehensive way the OpenShift installer identifies suitable subnets for various cluster services and components.
124-
====
113+
====

modules/nw-allocating-load-balancers-to-subnets.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@
66
[id="nw-allocating-load-balancers-to-subnets_{context}"]
77
= Allocating API and Ingress Load Balancers to Specific Subnets on AWS
88

9+
[role="_abstract"]
910
You can control the network placement of OpenShift Load Balancers on AWS, including those for the Ingress Controller, by explicitly defining your virtual private cloud's (VPC's) subnets and assigning them specific roles directly within the `platform.aws.vpc.subnets` section of the `install-config.yaml` file. This method provides granular control over which subnets are used for resources, such as the Ingress Controller and other cluster components.

modules/nw-externalip-about.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
[id="nw-externalip-about_{context}"]
77
= About ExternalIP
88

9+
[role="_abstract"]
910
For non-cloud environments, {product-title} supports the use of the ExternalIP facility to specify external IP addresses in the `spec.externalIPs[]` parameter of the `Service` object. A service configured with an ExternalIP functions similarly to a service with `type=NodePort`, whereby you traffic directs to a local node for load balancing.
1011

1112
[IMPORTANT]

modules/restrictions-on-ip-assignment.adoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66
[id="restrictions-on-ip-assignment_{context}"]
77
= Restrictions on the assignment of an external IP address
88

9+
[role="_abstract"]
910
As a cluster administrator, you can specify IP address blocks to allow and to reject IP addresses for a service. Restrictions apply only to users without `cluster-admin` privileges. A cluster administrator can always set the service `spec.externalIPs[]` field to any IP address.
1011

11-
You configure an IP address policy by specifying Classless Inter-Domain Routing (CIDR) address blocks for the `spec.ExternalIP.policy` parameter in the `policy` object.
12+
You configure an IP address policy by specifying Classless Inter-Domain Routing (CIDR) address blocks for the `spec.ExternalIP.policy` parameter in the `policy` object, as demonstrated in the following example:
1213

1314
.Example in JSON form of a `policy` object and its CIDR parameters
1415
[source,json]
@@ -23,9 +24,9 @@ You configure an IP address policy by specifying Classless Inter-Domain Routing
2324

2425
When configuring policy restrictions, the following rules apply:
2526

26-
- If `policy` is set to `{}`, creating a `Service` object with `spec.ExternalIPs[]` results in a failed service. This setting is the default for {product-title}. The same behavior exists for `policy: null`.
27-
- If `policy` is set and either `policy.allowedCIDRs[]` or `policy.rejectedCIDRs[]` is set, the following rules apply:
27+
* If `policy` is set to `{}`, creating a `Service` object with `spec.ExternalIPs[]` results in a failed service. This setting is the default for {product-title}. The same behavior exists for `policy: null`.
28+
* If `policy` is set and either `policy.allowedCIDRs[]` or `policy.rejectedCIDRs[]` is set, the following rules apply:
29+
** If `allowedCIDRs[]` and `rejectedCIDRs[]` are both set, `rejectedCIDRs[]` has precedence over `allowedCIDRs[]`.
30+
** If `allowedCIDRs[]` is set, creating a `Service` object with `spec.ExternalIPs[]` succeeds only if the specified IP addresses are allowed.
31+
** If `rejectedCIDRs[]` is set, creating a `Service` object with `spec.ExternalIPs[]` succeeds only if the specified IP addresses are not rejected.
2832
29-
* If `allowedCIDRs[]` and `rejectedCIDRs[]` are both set, `rejectedCIDRs[]` has precedence over `allowedCIDRs[]`.
30-
* If `allowedCIDRs[]` is set, creating a `Service` object with `spec.ExternalIPs[]` succeeds only if the specified IP addresses are allowed.
31-
* If `rejectedCIDRs[]` is set, creating a `Service` object with `spec.ExternalIPs[]` succeeds only if the specified IP addresses are not rejected.

networking/ingress_load_balancing/configuring_ingress_cluster_traffic/allocating-load-balancers.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9+
[role="_abstract"]
910
You can manage application traffic efficiently by allocating load balancers. Network administrators can allocate load balancers to customize deployments which can ensure optimal traffic distribution, high availability of applications, uninterrupted service, and network segmentation.
1011

1112
// Allocating API and Ingress Load Balancers to Specific Subnets on AWS

networking/ingress_load_balancing/configuring_ingress_cluster_traffic/configuring-externalip.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ include::_attributes/common-attributes.adoc[]
66

77
toc::[]
88

9-
As a cluster administrator, you can select an IP address block that is external to the cluster that can send traffic to services in the cluster.
9+
[role="_abstract"]
10+
As a cluster administrator, you can select an IP address block that is external to the cluster that can send traffic to services in the cluster. This functionality is generally most useful for clusters installed on bare-metal hardware.
1011

11-
This functionality is generally most useful for clusters installed on bare-metal hardware.
12-
13-
== Prerequisites
14-
15-
* Your network infrastructure must route traffic for the external IP addresses to your cluster.
12+
[IMPORTANT]
13+
====
14+
Before you configure ExternalIPs for services, your network infrastructure must route traffic for the external IP addresses to your cluster.
15+
====
1616

1717
// About ExternalIP
1818
include::modules/nw-externalip-about.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)