Skip to content

Commit 4e5585e

Browse files
authored
Merge pull request #71263 from jeana-redhat/OSDOCS-9565-AWS-Outposts-MAPI
OSDOCS-9565: configuring AWS Outposts postinstallation
2 parents 4e50627 + b3d1ce0 commit 4e5585e

14 files changed

+923
-85
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -633,6 +633,8 @@ Topics:
633633
- Name: Adding failure domains to an existing Nutanix cluster
634634
File: adding-nutanix-failure-domains
635635
Distros: openshift-origin,openshift-enterprise
636+
- Name: Extending an AWS VPC cluster into an AWS Outpost
637+
File: configuring-aws-outposts
636638
---
637639
Name: Updating clusters
638640
Dir: updating

installing/installing_aws/installing-aws-outposts.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,6 @@ toc::[]
88

99
In {product-title} version 4.14, you could install a cluster on Amazon Web Services (AWS) with compute nodes running in AWS Outposts as a Technology Preview. As of {product-title} version 4.15, this installation method is no longer supported.
1010

11-
Instead, you can xref:../../installing/installing_aws/installing-aws-vpc.adoc#installing-aws-vpc[install a cluster on AWS into an existing VPC] and provision compute nodes on AWS Outposts as a postinstallation configuration task.
11+
Instead, you can xref:../../installing/installing_aws/installing-aws-vpc.adoc#installing-aws-vpc[install a cluster on AWS into an existing VPC] and provision compute nodes on AWS Outposts as a postinstallation configuration task.
12+
13+
For more information, see xref:../../post_installation_configuration/configuring-aws-outposts.adoc#configuring-aws-outposts[Extending an AWS VPC cluster into an AWS Outpost]

installing/installing_aws/installing-aws-vpc.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,4 @@ include::modules/cluster-telemetry.adoc[leveloffset=+1]
121121
* xref:../../post_installation_configuration/cluster-tasks.adoc#available_cluster_customizations[Customize your cluster].
122122
* 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].
123123
* If necessary, you can xref:../../post_installation_configuration/cluster-tasks.adoc#manually-removing-cloud-creds_post-install-cluster-tasks[remove cloud provider credentials].
124+
* After installing a cluster on AWS into an existing VPC, you can xref:../../post_installation_configuration/configuring-aws-outposts.adoc#configuring-aws-outposts[extend the AWS VPC cluster into an AWS Outpost].
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * post_installation_configuration/configuring-aws-outposts.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="aws-outposts-environment-info-aws_{context}"]
7+
= Obtaining information from your AWS account
8+
9+
You can use the AWS CLI (`aws`) to obtain information from your AWS account.
10+
11+
[TIP]
12+
====
13+
You might find it convenient to store some or all of these values as environment variables by using the `export` command.
14+
====
15+
16+
.Prerequisites
17+
18+
* You have an AWS Outposts site with the required hardware setup complete.
19+
20+
* Your Outpost is connected to your AWS account.
21+
22+
* You have access to your AWS account by using the AWS CLI (`aws`) as a user with permissions to perform the required tasks.
23+
24+
.Procedure
25+
26+
. List the Outposts that are connected to your AWS account by running the following command:
27+
+
28+
[source,terminal]
29+
----
30+
$ aws outposts list-outposts
31+
----
32+
33+
. Retain the following values from the output of the `aws outposts list-outposts` command:
34+
35+
** The Outpost ID.
36+
37+
** The Amazon Resource Name (ARN) for the Outpost.
38+
39+
** The Outpost availability zone.
40+
+
41+
[NOTE]
42+
====
43+
The output of the `aws outposts list-outposts` command includes two values related to the availability zone: `AvailabilityZone` and `AvailabilityZoneId`. You use the `AvailablilityZone` value to configure a compute machine set that creates compute machines in your Outpost.
44+
====
45+
46+
. Using the value of the Outpost ID, show the instance types that are available in your Outpost by running the following command. Retain the values of the available instance types.
47+
+
48+
[source,terminal]
49+
----
50+
$ aws outposts get-outpost-instance-types \
51+
--outpost-id <outpost_id_value>
52+
----
53+
54+
. Using the value of the Outpost ARN, show the subnet ID for the Outpost by running the following command. Retain this value.
55+
+
56+
[source,terminal]
57+
----
58+
$ aws ec2 describe-subnets \
59+
--filters Name=outpost-arn,Values=<outpost_arn_value>
60+
----
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * post_installation_configuration/configuring-aws-outposts.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="aws-outposts-environment-info-oc_{context}"]
7+
= Obtaining information from your {product-title} cluster
8+
9+
You can use the {oc-first} to obtain information from your {product-title} cluster.
10+
11+
[TIP]
12+
====
13+
You might find it convenient to store some or all of these values as environment variables by using the `export` command.
14+
====
15+
16+
.Prerequisites
17+
18+
* You have installed an {product-title} cluster into a custom VPC on AWS.
19+
20+
* You have access to the cluster using an account with `cluster-admin` permissions.
21+
22+
* You have installed the {oc-first}.
23+
24+
.Procedure
25+
26+
. List the infrastructure ID for the cluster by running the following command. Retain this value.
27+
+
28+
[source,terminal]
29+
----
30+
$ oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructures.config.openshift.io cluster
31+
----
32+
33+
. Obtain details about the compute machine sets that the installation program created by running the following commands:
34+
35+
.. List the compute machine sets on your cluster:
36+
+
37+
[source,terminal]
38+
----
39+
$ oc get machinesets.machine.openshift.io -n openshift-machine-api
40+
----
41+
+
42+
.Example output
43+
[source,text]
44+
----
45+
NAME DESIRED CURRENT READY AVAILABLE AGE
46+
<compute_machine_set_name_1> 1 1 1 1 55m
47+
<compute_machine_set_name_2> 1 1 1 1 55m
48+
----
49+
50+
.. Display the Amazon Machine Image (AMI) ID for one of the listed compute machine sets. Retain this value.
51+
+
52+
[source,terminal]
53+
----
54+
$ oc get machinesets.machine.openshift.io <compute_machine_set_name_1> \
55+
-n openshift-machine-api \
56+
-o jsonpath='{.spec.template.spec.providerSpec.value.ami.id}'
57+
----
58+
59+
.. Display the subnet ID for the AWS VPC cluster. Retain this value.
60+
+
61+
[source,terminal]
62+
----
63+
$ oc get machinesets.machine.openshift.io <compute_machine_set_name_1> \
64+
-n openshift-machine-api \
65+
-o jsonpath='{.spec.template.spec.providerSpec.value.subnet.id}'
66+
----
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * post_installation_configuration/configuring-aws-outposts.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="aws-outposts-load-balancer-clb_{context}"]
7+
= Using AWS Classic Load Balancers in an AWS VPC cluster extended into an Outpost
8+
9+
AWS Outposts racks cannot run AWS Classic Load Balancers, but Classic Load Balancers in the AWS VPC cluster can target edge compute nodes in the Outpost if edge and cloud-based subnets are in the same availability zone.
10+
As a result, Classic Load Balancers on the VPC cluster might schedule pods on either of these node types.
11+
12+
Scheduling the workloads on edge compute nodes is supported, but can introduce latency.
13+
If you want to prevent a Classic Load Balancer in the VPC cluster from targeting Outpost edge compute nodes, you can apply labels to the cloud-based compute nodes and configure the Classic Load Balancer to only schedule on nodes with the applied labels.
14+
15+
[NOTE]
16+
====
17+
If you do not need to prevent a Classic Load Balancer in the VPC cluster from targeting Outpost edge compute nodes, you do not need to complete these steps.
18+
====
19+
20+
.Prerequisites
21+
22+
* You have extended an AWS VPC cluster into an Outpost.
23+
24+
* You have access to the cluster using an account with `cluster-admin` permissions.
25+
26+
* You have installed the {oc-first}.
27+
28+
* You have created a user workload in the Outpost with tolerations that match the taints for your edge compute machines.
29+
30+
.Procedure
31+
32+
. Optional: Verify that the edge compute nodes have the `location=outposts` label by running the following command and verifying that the output includes only the edge compute nodes in your Outpost:
33+
+
34+
[source,terminal]
35+
----
36+
$ oc get nodes -l location=outposts
37+
----
38+
39+
. Label the cloud-based compute nodes in the VPC cluster with a key-value pair by running the following command:
40+
+
41+
[source,terminal]
42+
----
43+
$ for NODE in $(oc get node -l node-role.kubernetes.io/worker --no-headers | grep -v outposts | awk '{print$1}'); do oc label node $NODE <key_name>=<value>; done
44+
----
45+
+
46+
where `<key_name>=<value>` is the label you want to use to distinguish cloud-based compute nodes.
47+
+
48+
.Example output
49+
[source,text]
50+
----
51+
node1.example.com labeled
52+
node2.example.com labeled
53+
node3.example.com labeled
54+
----
55+
56+
. Optional: Verify that the cloud-based compute nodes have the specified label by running the following command and confirming that the output includes all cloud-based compute nodes in your VPC cluster:
57+
+
58+
[source,terminal]
59+
----
60+
$ oc get nodes -l <key_name>=<value>
61+
----
62+
+
63+
.Example output
64+
[source,terminal]
65+
----
66+
NAME STATUS ROLES AGE VERSION
67+
node1.example.com Ready worker 7h v1.28.5
68+
node2.example.com Ready worker 7h v1.28.5
69+
node3.example.com Ready worker 7h v1.28.5
70+
----
71+
72+
. Configure the Classic Load Balancer service by adding the cloud-based subnet information to the `annotations` field of the `Service` manifest:
73+
+
74+
.Example service configuration
75+
[source,yaml]
76+
----
77+
apiVersion: v1
78+
kind: Service
79+
metadata:
80+
labels:
81+
app: <application_name>
82+
name: <application_name>
83+
namespace: <application_namespace>
84+
annotations:
85+
service.beta.kubernetes.io/aws-load-balancer-subnets: <aws_subnet> # <1>
86+
service.beta.kubernetes.io/aws-load-balancer-target-node-labels: <key_name>=<value> # <2>
87+
spec:
88+
ports:
89+
- name: http
90+
port: 80
91+
protocol: TCP
92+
targetPort: 8080
93+
selector:
94+
app: <application_name>
95+
type: LoadBalancer
96+
----
97+
<1> Specify the subnet ID for the AWS VPC cluster.
98+
<2> Specify the key-value pair that matches the pair in the node label.
99+
100+
. Create the `Service` CR by running the following command:
101+
+
102+
[source,terminal]
103+
----
104+
$ oc create -f <file_name>.yaml
105+
----
106+
107+
.Verification
108+
109+
. Verify the status of the `service` resource to show the host of the provisioned Classic Load Balancer by running the following command:
110+
+
111+
[source,terminal]
112+
----
113+
$ HOST=$(oc get service <application_name> -n <application_namespace> --template='{{(index .status.loadBalancer.ingress 0).hostname}}')
114+
----
115+
116+
. Verify the status of the provisioned Classic Load Balancer host by running the following command:
117+
+
118+
[source,terminal]
119+
----
120+
$ curl $HOST
121+
----
122+
123+
. In the AWS console, verify that only the labeled instances appear as the targeted instances for the load balancer.

0 commit comments

Comments
 (0)