You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/configuration-externalip.adoc
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,8 @@
6
6
[id="configuration-externalip_{context}"]
7
7
= Configuration for ExternalIP
8
8
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:
10
11
11
12
* `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.
= Specifying AWS subnets for OpenShift API and ingress load balancers at installation
8
8
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.
10
11
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
+
----
12
25
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.
14
27
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.
16
29
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.
18
31
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
20
33
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.
21
37
** Use subnets spanning at least two availability zones (AZs) for high availability of load balancers and other critical components, like control planes.
22
-
23
38
** You have sufficient available IP addresses within these subnets for all assigned roles.
24
-
25
39
** 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
-
27
40
* You have the OpenShift installer binary for your target OpenShift version.
28
-
29
41
* You have an `install-config.yaml` file.
30
42
31
43
.Procedure
32
44
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:
This command creates the `install-config.yaml` file in the specified directory.
43
53
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.
49
57
+
50
58
[source,yaml]
51
59
----
52
60
apiVersion: v1
53
-
baseDomain: example.com <1>
61
+
baseDomain: example.com
54
62
metadata:
55
63
name: my-cluster # Example cluster name
56
64
platform:
57
65
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
62
70
roles:
63
-
- type: IngressControllerLB <6>
71
+
- type: IngressControllerLB
64
72
- type: BootstrapNode
65
73
- id: subnet-0xxxxxxxxxxxxxxza # Public Subnet in another AZ for HA
66
74
roles:
67
75
- type: IngressControllerLB
68
76
- id: subnet-0fcf8e0392f0910d4 # Private Subnet in AZ us-east-1a
69
77
roles:
70
-
- type: ClusterNode <7>
78
+
- type: ClusterNode
71
79
- id: subnet-0yyyyyyyyyyyyyyzb # Private Subnet in another AZ for HA
72
80
roles:
73
81
- type: ClusterNode
74
82
# Add other subnet IDs and their roles as needed for your cluster architecture
75
-
pullSecret: '...' <8>
76
-
sshKey: '...' <9>
83
+
pullSecret: '...'
84
+
sshKey: '...'
77
85
----
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.
87
86
+
88
-
Entries for control plane load balancers in the `subnets` list would follow a similar pattern:
87
+
where:
89
88
+
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:
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
+
+
121
110
[NOTE]
122
111
====
123
112
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.
= Allocating API and Ingress Load Balancers to Specific Subnets on AWS
8
8
9
+
[role="_abstract"]
9
10
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.
Copy file name to clipboardExpand all lines: modules/nw-externalip-about.adoc
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@
6
6
[id="nw-externalip-about_{context}"]
7
7
= About ExternalIP
8
8
9
+
[role="_abstract"]
9
10
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.
Copy file name to clipboardExpand all lines: modules/nw-externalip-object.adoc
+13-17Lines changed: 13 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,12 +6,12 @@
6
6
[id="nw-externalip-object_{context}"]
7
7
= ExternalIP address block configuration
8
8
9
+
[role="_abstract"]
9
10
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.
10
11
11
12
[IMPORTANT]
12
13
====
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.
15
15
====
16
16
17
17
The following YAML describes the ExternalIP configuration:
@@ -25,36 +25,32 @@ metadata:
25
25
name: cluster
26
26
spec:
27
27
externalIP:
28
-
autoAssignCIDRs: [] <1>
28
+
autoAssignCIDRs: []
29
29
policy: <2>
30
30
...
31
31
----
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.
33
33
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.
38
35
39
36
The following YAML describes the fields for the `policy` stanza:
40
37
41
38
.Network.config.openshift.io `policy` stanza
42
39
[source,yaml]
43
40
----
44
41
policy:
45
-
allowedCIDRs: [] <1>
46
-
rejectedCIDRs: [] <2>
42
+
allowedCIDRs: []
43
+
rejectedCIDRs: []
47
44
----
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.
51
47
52
48
== Example external IP configurations
53
49
54
50
Several possible configurations for external IP address pools are displayed in the following examples:
55
51
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
+
58
54
.Example configuration with `spec.externalIP.autoAssignCIDRs` set
59
55
[source,yaml]
60
56
----
@@ -69,8 +65,8 @@ spec:
69
65
- 192.168.132.254/29
70
66
----
71
67
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
+
74
70
.Example configuration with `spec.externalIP.policy` set
Copy file name to clipboardExpand all lines: modules/restrictions-on-ip-assignment.adoc
+7-6Lines changed: 7 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,10 @@
6
6
[id="restrictions-on-ip-assignment_{context}"]
7
7
= Restrictions on the assignment of an external IP address
8
8
9
+
[role="_abstract"]
9
10
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.
10
11
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:
12
13
13
14
.Example in JSON form of a `policy` object and its CIDR parameters
14
15
[source,json]
@@ -23,9 +24,9 @@ You configure an IP address policy by specifying Classless Inter-Domain Routing
23
24
24
25
When configuring policy restrictions, the following rules apply:
25
26
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.
28
32
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.
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.
10
11
11
12
// Allocating API and Ingress Load Balancers to Specific Subnets on AWS
0 commit comments