Skip to content

Commit 1f25139

Browse files
maxwelldbmtulioyunjiang29
authored
[OSDOCS-5240] Installer support to automatically create the MachineSets when installing in existing VPC on AWS w/Local Zones (#57427)
Co-authored-by: Marco Braga <[email protected]> Co-authored-by: Yunfei Jiang <[email protected]>
1 parent a0a0e75 commit 1f25139

13 files changed

+322
-176
lines changed

installing/installing_aws/installing-aws-localzone.adoc

Lines changed: 36 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,24 @@ If you have an AWS profile stored on your computer, it must not use a temporary
4141
Be sure to also review this site list if you are configuring a proxy.
4242
====
4343
* If the cloud identity and access management (IAM) APIs are not accessible in your environment, or if you do not want to store an administrator-level credential secret in the `kube-system` namespace, you can xref:../../installing/installing_aws/manually-creating-iam.adoc#manually-creating-iam-aws[manually create and maintain IAM credentials].
44+
* Add permission for the user who creates the cluster to modify the Local Zone group with `ec2:ModifyAvailabilityZoneGroup`. For example:
45+
+
46+
.An example of a permissive IAM policy to attach to a user or role
47+
[source,yaml]
48+
----
49+
{
50+
"Version": "2012-10-17",
51+
"Statement": [
52+
{
53+
"Action": [
54+
"ec2:ModifyAvailabilityZoneGroup"
55+
],
56+
"Effect": "Allow",
57+
"Resource": "*"
58+
}
59+
]
60+
}
61+
----
4462

4563
include::modules/cluster-limitations-local-zone.adoc[leveloffset=+1]
4664

@@ -51,14 +69,14 @@ include::modules/cluster-limitations-local-zone.adoc[leveloffset=+1]
5169

5270
include::modules/cluster-entitlements.adoc[leveloffset=+1]
5371

54-
include::modules/installation-aws-add-local-zone-locations.adoc[leveloffset=+1]
55-
5672
include::modules/installation-aws-marketplace-subscribe.adoc[leveloffset=+1]
5773

5874
include::modules/installation-creating-aws-vpc-localzone.adoc[leveloffset=+1]
5975

6076
include::modules/installation-cloudformation-vpc-localzone.adoc[leveloffset=+2]
6177

78+
include::modules/installation-aws-add-local-zone-locations.adoc[leveloffset=+1]
79+
6280
include::modules/installation-creating-aws-subnet-localzone.adoc[leveloffset=+1]
6381

6482
include::modules/installation-cloudformation-subnet-localzone.adoc[leveloffset=+2]
@@ -82,6 +100,17 @@ include::modules/installation-aws-tested-machine-types.adoc[leveloffset=+2]
82100
* See link:https://aws.amazon.com/about-aws/global-infrastructure/localzones/features/[AWS Local Zones features] in the AWS documentation for more information about AWS Local Zones and the supported instances types and services.
83101

84102
include::modules/installation-generate-aws-user-infra-install-config.adoc[leveloffset=+2]
103+
// Suggest to standarize edge-pool's specific files with same prefixes, like: machine-edge-pool-[...] or compute-edge-pool-[...] (which is more compatible with install-config.yaml/compute)
104+
include::modules/machines-edge-machine-pool.adoc[leveloffset=+2]
105+
include::modules/edge-machine-pools-aws-local-zones.adoc[leveloffset=+3]
106+
107+
[role="_additional-resources"]
108+
.Additional resources
109+
110+
* xref:../../networking/changing-cluster-network-mtu.adoc#mtu-value-selection_changing-cluster-network-mtu[Changing the MTU for the cluster network]
111+
* xref:../../networking/changing-cluster-network-mtu.adoc#nw-ovn-ipsec-enable_configuring-ipsec-ovn[Enabling IPsec encryption]
112+
113+
include::modules/install-creating-install-config-aws-local-zones.adoc[leveloffset=+2]
85114

86115
[role="_additional-resources"]
87116
.Additional resources
@@ -91,13 +120,9 @@ include::modules/installation-generate-aws-user-infra-install-config.adoc[levelo
91120
//include::modules/installation-configure-proxy.adoc[leveloffset=+2]
92121
//Put this back if QE validates it.
93122

94-
include::modules/installation-localzone-generate-k8s-manifest.adoc[leveloffset=+2]
123+
// Verify removal due to automation.
124+
// include::modules/installation-localzone-generate-k8s-manifest.adoc[leveloffset=+2]
95125

96-
[role="_additional-resources"]
97-
.Additional resources
98-
99-
* xref:../../networking/changing-cluster-network-mtu.adoc#mtu-value-selection_changing-cluster-network-mtu[Changing the MTU for the cluster network]
100-
* xref:../../networking/changing-cluster-network-mtu.adoc#nw-ovn-ipsec-enable_configuring-ipsec-ovn[Enabling IPsec encryption]
101126

102127
include::modules/installation-launching-installer.adoc[leveloffset=+1]
103128

@@ -115,6 +140,8 @@ include::modules/logging-in-by-using-the-web-console.adoc[leveloffset=+1]
115140

116141
* See xref:../../web_console/web-console.adoc#web-console[Accessing the web console] for more details about accessing and understanding the {product-title} web console.
117142

143+
include::modules/machine-edge-pool-review-nodes.adoc[leveloffset=+1]
144+
118145
include::modules/cluster-telemetry.adoc[leveloffset=+1]
119146

120147
[role="_additional-resources"]
@@ -125,6 +152,7 @@ include::modules/cluster-telemetry.adoc[leveloffset=+1]
125152
[id="installing-aws-localzone-next-steps"]
126153
== Next steps
127154

155+
* xref:../../post_installation_configuration/cluster-tasks.adoc#installation-extend-edge-nodes-aws-local-zones_post-install-cluster-tasks[Creating user workloads in AWS Local Zones].
128156
* xref:../../installing/validating-an-installation.adoc#validating-an-installation[Validating an installation].
129157
* xref:../../post_installation_configuration/cluster-tasks.adoc#available_cluster_customizations[Customize your cluster].
130158
* If necessary, you can xref:../../support/remote_health_monitoring/opting-out-of-remote-health-reporting.adoc#opting-out-remote-health-reporting_opting-out-remote-health-reporting[opt out of remote health reporting].
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
// Module included in the following assemblies:
2+
// * installing/installing_aws/installing-aws-localzone.adoc
3+
4+
:_content-type: CONCEPT
5+
[id="edge-machine-pools-aws-local-zones_{context}"]
6+
= Edge compute pools and AWS Local Zones
7+
8+
Edge worker nodes are tainted worker nodes that run in AWS Local Zones locations.
9+
10+
When deploying a cluster that uses Local Zones:
11+
12+
* Amazon EC2 instances in the Local Zones are more expensive than Amazon EC2 instances in the Availability Zones.
13+
* Latency between applications and end users is lower in Local Zones, and it may vary by location. There is a latency impact for some workloads if, for example, routers are mixed between Local Zones and Availability Zones.
14+
* The cluster-network Maximum Transmission Unit (MTU) is adjusted automatically to the lower restricted by AWS when Local Zone subnets are detected on the `install-config.yaml`, according to the network plugin. For example, the adjusted values are 1200 for OVN-Kubernetes and 1250 for OpenShift SDN. If additional features are enabled, manual MTU adjustment can be necessary.
15+
16+
[IMPORTANT]
17+
====
18+
Generally, the Maximum Transmission Unit (MTU) between an Amazon EC2 instance in a Local Zone and an Amazon EC2 instance in the Region is 1300. For more information, see link:https://docs.aws.amazon.com/local-zones/latest/ug/how-local-zones-work.html[How Local Zones work] in the AWS documentation.
19+
The cluster network MTU must be always less than the EC2 MTU to account for the overhead. The specific overhead is determined by the network plugin, for example:
20+
21+
- OVN-Kubernetes: `100 bytes`
22+
- OpenShift SDN: `50 bytes`
23+
24+
The network plugin can provide additional features, like IPsec, that also must be decreased the MTU. For additional information, see the documentation.
25+
====
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Module included in the following assemblies:
2+
// * installing/installing_aws/installing-aws-localzone.adoc
3+
4+
:_content-type: PROCEDURE
5+
[id="install-creating-install-config-aws-local-zones_{context}"]
6+
= Modifying an installation configuration file to use AWS Local Zones subnets
7+
8+
Modify an `install-config.yaml` file to include AWS Local Zones subnets.
9+
10+
.Prerequisites
11+
12+
* You created subnets by using the procedure "Creating a subnet in AWS Local Zones".
13+
* You created an `install-config.yaml` file by using the procedure "Creating the installation configuration file".
14+
15+
.Procedure
16+
17+
* Add the VPC and Local Zone subnets as the values of the `platform.aws.subnets` property. As an example:
18+
+
19+
[source,yaml]
20+
----
21+
...
22+
platform:
23+
aws:
24+
region: us-west-2
25+
subnets: <1>
26+
- publicSubnetId-1
27+
- publicSubnetId-2
28+
- publicSubnetId-3
29+
- privateSubnetId-1
30+
- privateSubnetId-2
31+
- privateSubnetId-3
32+
- publicSubnetId-LocalZone-1
33+
...
34+
----
35+
<1> List of subnets created in the Availability and Local Zones.

modules/installation-aws-add-local-zone-locations.adoc

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,32 @@ $ export CLUSTER_REGION="<region_name>" <1>
2323
----
2424
<1> For `<region_name>`, specify a valid AWS region name, such as `us-east-1`.
2525

26-
. Review the list of zones that your region contains by running the following command:
26+
. List the zones that are available in your region by running the following command:
2727
+
2828
[source,terminal]
2929
----
30-
$ aws ec2 describe-availability-zones \
31-
--filters Name=region-name,Values=${CLUSTER_REGION} \
32-
--query 'AvailabilityZones[].ZoneName' \
30+
$ aws --region ${CLUSTER_REGION} ec2 describe-availability-zones \
31+
--query 'AvailabilityZones[].[{ZoneName: ZoneName, GroupName: GroupName, Status: OptInStatus}]' \
32+
--filters Name=zone-type,Values=local-zone \
3333
--all-availability-zones
3434
----
3535
+
36-
Depending on the region, the list of available zones can be long. The different zones use the following naming conventions:
36+
Depending on the region, the list of available zones can be long. The command will return the following fields:
3737
+
38-
`${REGION}[a-z]`:: Availability zones available in the region.
39-
`${REGION}-LID-N[a-z]`:: Available AWS Local Zones. `${REGION}LID-N` is the zone group identifier, and `[a-z]` is the zone identifier.
40-
`${REGION}-wl1-LID-wlz-[1-9]`:: Available Wavelength zones.
38+
`ZoneName`:: The name of the Local Zone.
39+
`GroupName`:: The group that the zone is part of. You need to save this name to opt in.
40+
`Status`:: The status of the Local Zone group. If the status is `not-opted-in`, you must opt in the `GroupName` by running the commands that follow.
4141

4242
. Export a variable to contain the name of the Local Zone to host your VPC by running the following command:
4343
+
4444
[source,terminal]
4545
----
46-
$ export ZONE_GROUP_NAME="${CLUSTER_REGION}-<location_identifier>-<zone_identifier>" <1>
46+
$ export ZONE_GROUP_NAME="<value_of_GroupName>" <1>
4747
----
48-
<1> For `<location_identifier>-<zone_identifier>`, specify the location identifier and zone identifier for the Local Zone that you selected for your region. For example, specify `nyc-1a` to use the US East (New York) Local Zone.
48+
+
49+
where:
50+
51+
<value_of_GroupName>:: Specifies the name of the group of the Local Zone you want to create subnets on. For example, specify `us-east-1-nyc-1` to use the zone `us-east-1-nyc-1a`, US East (New York).
4952

5053
. Opt in to the zone group on your AWS account by running the following command:
5154
+

modules/installation-cloudformation-subnet-localzone.adoc

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,17 @@ you need for your {product-title} cluster that uses AWS Local Zones.
1616
----
1717
# CloudFormation template used to create Local Zone subnets and dependencies
1818
AWSTemplateFormatVersion: 2010-09-09
19-
Description: Template for Best Practice VPC with 1-3 AZs
19+
Description: Template for create Public Local Zone subnets
2020
2121
Parameters:
22-
ClusterName:
23-
Description: ClusterName used to prefix resource names
24-
Type: String
2522
VpcId:
2623
Description: VPC Id
2724
Type: String
28-
LocalZoneName:
29-
Description: Local Zone Name (Example us-east-1-bos-1)
25+
ZoneName:
26+
Description: Local Zone Name (Example us-east-1-nyc-1a)
3027
Type: String
31-
LocalZoneNameShort:
32-
Description: Short name for Local Zone used on tag Name (Example bos1)
28+
SubnetName:
29+
Description: Local Zone Name (Example cluster-public-us-east-1-nyc-1a)
3330
Type: String
3431
PublicRouteTableId:
3532
Description: Public Route Table ID to associate the Local Zone subnet
@@ -47,12 +44,10 @@ Resources:
4744
Properties:
4845
VpcId: !Ref VpcId
4946
CidrBlock: !Ref PublicSubnetCidr
50-
AvailabilityZone: !Ref LocalZoneName
47+
AvailabilityZone: !Ref ZoneName
5148
Tags:
5249
- Key: Name
53-
Value: !Join
54-
- ""
55-
- [ !Ref ClusterName, "-public-", !Ref LocalZoneNameShort, "-1" ]
50+
Value: !Ref SubnetName
5651
- Key: kubernetes.io/cluster/unmanaged
5752
Value: "true"
5853
@@ -66,9 +61,6 @@ Outputs:
6661
PublicSubnetIds:
6762
Description: Subnet IDs of the public subnets.
6863
Value:
69-
!Join [
70-
"",
71-
[!Ref PublicSubnet]
72-
]
64+
!Join ["", [!Ref PublicSubnet]]
7365
----
7466
====

0 commit comments

Comments
 (0)