Skip to content

Commit e29a45e

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

10 files changed

+89
-97
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/example-policy-objects.adoc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
[id="example-policy-objects_{context}"]
77
= Example policy objects
88

9-
The examples in this section show different `spec.externalIP.policy` configurations.
9+
[role="_abstract"]
10+
Reference the following examples to understand different `spec.externalIP.policy` configurations.
1011

1112
- In the following example, the policy prevents {product-title} from creating any service with a specified external IP address.
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/nw-externalip-configuring.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@
66
[id="nw-externalip-configuring_{context}"]
77
= Configure external IP address blocks for your cluster
88

9+
[role="_abstract"]
910
As a cluster administrator, you can configure the following ExternalIP settings:
1011

1112
- An ExternalIP address block used by {product-title} to automatically populate the `spec.clusterIP` field for a `Service` object.
1213
- A policy object to restrict what IP addresses may be manually assigned to the `spec.clusterIP` array of a `Service` object.
1314
1415
.Prerequisites
1516

16-
* Install the OpenShift CLI (`oc`).
17+
* Install the {oc-first}
1718
* Access to the cluster as a user with the `cluster-admin` role.
1819
1920
.Procedure
@@ -42,10 +43,10 @@ metadata:
4243
name: cluster
4344
spec:
4445
...
45-
externalIP: <1>
46+
externalIP:
4647
...
4748
----
48-
<1> Specify the configuration for the `externalIP` stanza.
49+
* `externalIP`: Specify the configuration for the `externalIP` stanza.
4950
5051
. To confirm the updated ExternalIP configuration, enter the following command:
5152
+

modules/nw-externalip-object.adoc

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
[id="nw-externalip-object_{context}"]
77
= ExternalIP address block configuration
88

9+
[role="_abstract"]
910
The configuration for ExternalIP address blocks is defined by a Network custom resource (CR) named `cluster`. The Network CR is part of the `config.openshift.io` API group.
1011

1112
[IMPORTANT]
1213
====
13-
During cluster installation, the Cluster Version Operator (CVO) automatically creates a Network CR named `cluster`.
14-
Creating any other CR objects of this type is not supported.
14+
During cluster installation, the Cluster Version Operator (CVO) automatically creates a Network CR named `cluster`. Creating any other CR objects of this type is not supported.
1515
====
1616

1717
The following YAML describes the ExternalIP configuration:
@@ -25,36 +25,32 @@ metadata:
2525
name: cluster
2626
spec:
2727
externalIP:
28-
autoAssignCIDRs: [] <1>
28+
autoAssignCIDRs: []
2929
policy: <2>
3030
...
3131
----
32-
<1> Defines the IP address block in CIDR format that is available for automatic assignment of external IP addresses to a service.
32+
* `autoAssignCIDRs`: Defines the IP address block in CIDR format that is available for automatic assignment of external IP addresses to a service.
3333
Only a single IP address range is allowed.
34-
35-
<2> Defines restrictions on manual assignment of an IP address to a service.
36-
If no restrictions are defined, specifying the `spec.externalIP` field in a `Service` object is not allowed.
37-
By default, no restrictions are defined.
34+
* `policy`: Defines restrictions on manual assignment of an IP address to a service. If no restrictions are defined, specifying the `spec.externalIP` field in a `Service` object is not allowed. By default, no restrictions are defined.
3835
3936
The following YAML describes the fields for the `policy` stanza:
4037

4138
.Network.config.openshift.io `policy` stanza
4239
[source,yaml]
4340
----
4441
policy:
45-
allowedCIDRs: [] <1>
46-
rejectedCIDRs: [] <2>
42+
allowedCIDRs: []
43+
rejectedCIDRs: []
4744
----
48-
<1> A list of allowed IP address ranges in CIDR format.
49-
<2> A list of rejected IP address ranges in CIDR format.
50-
45+
* `allowedCIDRs`: A list of allowed IP address ranges in CIDR format.
46+
* `rejectedCIDRs`: A list of rejected IP address ranges in CIDR format.
5147
5248
== Example external IP configurations
5349

5450
Several possible configurations for external IP address pools are displayed in the following examples:
5551

56-
- The following YAML describes a configuration that enables automatically assigned external IP addresses:
57-
+
52+
The following YAML describes a configuration that enables automatically assigned external IP addresses:
53+
5854
.Example configuration with `spec.externalIP.autoAssignCIDRs` set
5955
[source,yaml]
6056
----
@@ -69,8 +65,8 @@ spec:
6965
- 192.168.132.254/29
7066
----
7167

72-
- The following YAML configures policy rules for the allowed and rejected CIDR ranges:
73-
+
68+
The following YAML configures policy rules for the allowed and rejected CIDR ranges:
69+
7470
.Example configuration with `spec.externalIP.policy` set
7571
[source,yaml]
7672
----

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

0 commit comments

Comments
 (0)