Skip to content

Commit cc4e2bf

Browse files
authored
Merge pull request #62606 from mletalie/OSDOCS-6908
[OSDOCS-6908] IMDSv2 Documentation wrongly under Node Management
2 parents 9317dfc + 2b12fa6 commit cc4e2bf

10 files changed

+125
-24
lines changed

modules/rosa-create-objects.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ a|--cluster-name <cluster_name>
134134
|--dry-run
135135
|Simulates creating the cluster.
136136

137+
|--ec2-metadata-http-tokens string
138+
|Configures the use of IMDSv2 for EC2 instances. Valid values are `optional` (default) or `required`.
139+
137140
|--enable-autoscaling
138141
|Enables autoscaling of compute nodes. By default, autoscaling is set to `2` nodes. To set non-default node limits, use this argument with the `--min-replicas` and `--max-replicas` arguments.
139142

modules/rosa-imds-cli.adoc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_install_access_delete_clusters/rosa-sts-creating-a-cluster-with-customizations.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="rosa-imds-cli_{context}"]
7+
= Enabling Instance Metadata Service in CLI
8+
9+
You can select your Instance Metadata Service (IMDS) type when creating your cluster in the ROSA CLI. You can select to use both IMDSv1 and IMDSv2, or you can select only IMDSv2.
10+
11+
.Prerequisites
12+
13+
* You installed and configured the latest AWS (`aws`), ROSA (`rosa`), and OpenShift (`oc`) CLIs on your workstation.
14+
* You logged in to your Red Hat account using the `rosa` CLI.
15+
* You have the permissions to create and manage clusters.
16+
17+
.Procedure
18+
19+
. In your terminal, create a ROSA cluster with your specifications by running the following command:
20+
+
21+
[source,terminal]
22+
----
23+
$ rosa create cluster --cluster <name_of_cluster> --ec2-metadata-http-tokens <required_or_optional> <1>
24+
----
25+
+
26+
<1> You can provide a value for the `--ec2-metadata-http-tokens` flag. Provide the `required` value to enable IMDSv2, or provide the `optional` value for a combination of IMDSv1 and IMDSv2. If you do not include this flag, you must select your IMDS type during the cluster creation prompts.
27+
28+
. Confirm the selection:
29+
+
30+
[source,terminal]
31+
----
32+
? Configure the use of IMDSv2 for ec2 instances optional/required: required
33+
----
34+
35+
.Verification
36+
37+
* After your cluster has been created, navigate to the cluster *Overview* tab in {cluster-manager-url} to see the *Instance Metadata Service (IMDS)* field that notes your IMDS version support.

modules/rosa-imds-ui.adoc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_install_access_delete_clusters/rosa-sts-creating-a-cluster-with-customizations.adoc
4+
5+
:_content-type: PROCEDURE
6+
[id="rosa-imds-ui_{context}"]
7+
= Enabling Instance Metadata Service in {cluster-manager}
8+
9+
You can select your Instance Metadata Service (IMDS) type when creating your cluster in {cluster-manager}. You can select both IMDSv1 and IMDSv2, or you can select only IMDSv2.
10+
11+
.Prerequisites
12+
13+
* You installed and configured the latest AWS (`aws`), ROSA (`rosa`), and OpenShift (`oc`) CLIs on your workstation.
14+
* You logged in to your Red Hat account by using the `rosa` CLI.
15+
* You have the permissions to create and manage clusters.
16+
* You have access to {cluster-manager-url}.
17+
18+
.Procedure
19+
20+
. Log in to the web console.
21+
. Create a ROSA cluster using your preferences.
22+
. In the *Create a ROSA Cluster** wizard on the **Cluster settings* -> *Machine pool* page, under the *Instance Metadata Service (IMDS)* section, select whether your machine pools use both IMDSv1 and IMDSv2, or only IMDSv2.
23+
. Select *Next* to save this selection.
24+
25+
.Verification
26+
27+
. After your cluster has been created, see the *Instance Metadata Service (IMDS)* field that notes your IMDS version support on the cluster *Overview* tab.

modules/rosa-imds.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * rosa_install_access_delete_clusters/rosa-sts-creating-a-cluster-with-customizations.adoc
4+
5+
:_content-type: CONCEPT
6+
[id="rosa-imds{context}"]
7+
= Instance Metadata Service
8+
9+
There are two types of ways to access instance metadata from a running instance:
10+
11+
* Instance Metadata Service Version 1 (IMDSv1) - a request/response method
12+
* Instance Metadata Service Version 2 (IMDSv2) - a session-oriented method
13+
14+
IMDSv2 uses session-oriented requests. With session-oriented requests, you create a session token that defines the session duration, which can be a minimum of one second and a maximum of six hours. During the specified duration, you can use the same session token for subsequent requests. After the specified duration expires, you must create a new session token to use for future requests.
15+
16+
When creating your ROSA cluster, you can configure your cluster to use both IMDSv1 and IMDSv2, or only IMDSv2. The instance metadata service distinguishes between IMDSv1 and IMDSv2 requests based on whether, for any given request, either the PUT or GET headers, which are unique to IMDSv2, are present in that request. If you specify to use IMDSv2 only, IMDSv1 ceases to function for your cluster. All machine pools on your cluster will use whichever IMDS type you select.

modules/rosa-sts-creating-a-cluster-with-customizations-cli.adoc

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -223,46 +223,54 @@ $ rosa create cluster --interactive --sts
223223
I: Interactive mode enabled.
224224
Any optional fields can be left empty and a default will be selected.
225225
? Cluster name: <cluster_name>
226-
? OpenShift version: 4.8.9 <1>
227-
I: Using arn:aws:iam::<aws_account_id>:role/ManagedOpenShift-Installer-Role for the Installer role <2>
226+
Deploy cluster with Hosted Control Plane (optional): No
227+
? OpenShift version: 4.13.4 <1>
228+
? Configure the use of IMDSv2 for ec2 instances optional/required (optional): <2>
229+
I: Using arn:aws:iam::<aws_account_id>:role/ManagedOpenShift-Installer-Role for the Installer role <3>
228230
I: Using arn:aws:iam::<aws_account_id>:role/ManagedOpenShift-ControlPlane-Role for the ControlPlane role
229231
I: Using arn:aws:iam::<aws_account_id>:role/ManagedOpenShift-Worker-Role for the Worker role
230232
I: Using arn:aws:iam::<aws_account_id>:role/ManagedOpenShift-Support-Role for the Support role
231233
? External ID (optional):
232-
? Operator roles prefix: <cluster_name>-<random_string> <3>
233-
? Multiple availability zones (optional): No <4>
234+
? Operator roles prefix: <cluster_name>-<random_string> <4>
235+
? Multiple availability zones (optional): No <5>
234236
? AWS region: us-east-1
235237
? PrivateLink cluster (optional): No
236238
? Install into an existing VPC (optional): No
237239
? Select availability zones (optional): No
238-
? Enable Customer Managed key (optional): No <5>
240+
? Enable Customer Managed key (optional): No <6>
239241
? Compute nodes instance type (optional):
240242
? Enable autoscaling (optional): No
241243
? Compute nodes: 2
242244
? Machine CIDR: 10.0.0.0/16
243245
? Service CIDR: 172.30.0.0/16
244246
? Pod CIDR: 10.128.0.0/14
245247
? Host prefix: 23
246-
? Encrypt etcd data (optional): No <6>
248+
? Encrypt etcd data (optional): No <7>
247249
? Disable Workload monitoring (optional): No
248250
I: Creating cluster '<cluster_name>'
249251
I: To create this cluster again in the future, you can run:
250-
rosa create cluster --cluster-name <cluster_name> --role-arn arn:aws:iam::<aws_account_id>:role/ManagedOpenShift-Installer-Role --support-role-arn arn:aws:iam::<aws_account_id>:role/ManagedOpenShift-Support-Role --master-iam-role arn:aws:iam::<aws_account_id>:role/ManagedOpenShift-ControlPlane-Role --worker-iam-role arn:aws:iam::<aws_account_id>:role/ManagedOpenShift-Worker-Role --operator-roles-prefix <cluster_name>-<random_string> --region us-east-1 --version 4.8.9 --compute-nodes 2 --machine-cidr 10.0.0.0/16 --service-cidr 172.30.0.0/16 --pod-cidr 10.128.0.0/14 --host-prefix 23 <7>
252+
rosa create cluster --cluster-name <cluster_name> --role-arn arn:aws:iam::<aws_account_id>:role/ManagedOpenShift-Installer-Role --support-role-arn arn:aws:iam::<aws_account_id>:role/ManagedOpenShift-Support-Role --master-iam-role arn:aws:iam::<aws_account_id>:role/ManagedOpenShift-ControlPlane-Role --worker-iam-role arn:aws:iam::<aws_account_id>:role/ManagedOpenShift-Worker-Role --operator-roles-prefix <cluster_name>-<random_string> --region us-east-1 --version 4.8.9 --compute-nodes 2 --machine-cidr 10.0.0.0/16 --service-cidr 172.30.0.0/16 --pod-cidr 10.128.0.0/14 --host-prefix 23 <8>
251253
I: To view a list of clusters and their status, run 'rosa list clusters'
252254
I: Cluster '<cluster_name>' has been created.
253255
I: Once the cluster is installed you will need to add an Identity Provider before you can login into the cluster. See 'rosa create idp --help' for more information.
254256
...
255257
----
256-
<1> When creating the cluster, the listed `OpenShift version` options include the major, minor, and patch versions, for example `4.8.9`.
257-
<2> If you have more than one set of account roles in your AWS account for your cluster version, an interactive list of options is provided.
258-
<3> Optional: By default, the cluster-specific Operator role names are prefixed with the cluster name and random 4-digit hash. You can optionally specify a custom prefix to replace `<cluster_name>-<hash>` in the role names. The prefix is applied when you create the cluster-specific Operator IAM roles. For information about the prefix, see _Defining an Operator IAM role prefix_.
258+
<1> When creating the cluster, the listed `OpenShift version` options include the major, minor, and patch versions, for example `4.13.4`.
259+
<2> Optional: Specify 'optional' to configure all EC2 instances to use both v1 and v2 endpoints of EC2 Instance Metadata Service (IMDS). This is the default value. Specify 'required' to configure all EC2 instances to use IMDSv2 only.
260+
+
261+
[IMPORTANT]
262+
====
263+
The Instance Metadata Service settings cannot be changed after your cluster is created.
264+
====
265+
<3> If you have more than one set of account roles in your AWS account for your cluster version, an interactive list of options is provided.
266+
<4> By default, the cluster-specific Operator role names are prefixed with the cluster name and random 4-digit hash. You can optionally specify a custom prefix to replace `<cluster_name>-<hash>` in the role names. The prefix is applied when you create the cluster-specific Operator IAM roles. For information about the prefix, see _Defining an Operator IAM role prefix_.
259267
+
260268
[NOTE]
261269
====
262270
If you specified custom ARN paths when you created the associated account-wide roles, the custom path is automatically detected. The custom path is applied to the cluster-specific Operator roles when you create them in a later step.
263271
====
264-
<4> Multiple availability zones are recommended for production workloads. The default is a single availability zone.
265-
<5> Enable this option if you are using your own AWS KMS key to encrypt the control plane, infrastructure, worker node root volumes, and PVs. Specify the ARN for the KMS key that you added to the account-wide role ARN to in the preceding step.
272+
<5> Optional: Multiple availability zones are recommended for production workloads. The default is a single availability zone.
273+
<6> Optional: Enable this option if you are using your own AWS KMS key to encrypt the control plane, infrastructure, worker node root volumes, and PVs. Specify the ARN for the KMS key that you added to the account-wide role ARN to in the preceding step.
266274
+
267275
[IMPORTANT]
268276
====
@@ -271,14 +279,14 @@ Only persistent volumes (PVs) created from the default storage class are encrypt
271279
PVs created by using any other storage class are still encrypted, but the PVs are not encrypted with this key unless the storage class is specifically configured to use this key.
272280
====
273281

274-
<6> Enable this option only if your use case requires etcd key value encryption in addition to the control plane storage encryption that encrypts the etcd volumes by default. With this option, the etcd key values are encrypted, but not the keys.
282+
<7> Optional: Enable this option only if your use case requires etcd key value encryption in addition to the control plane storage encryption that encrypts the etcd volumes by default. With this option, the etcd key values are encrypted, but not the keys.
275283
+
276284
[IMPORTANT]
277285
====
278286
By enabling etcd encryption for the key values in etcd, you will incur a performance overhead of approximately 20%. The overhead is a result of introducing this second layer of encryption, in addition to the default control plane storage encryption that encrypts the etcd volumes. Red Hat recommends that you enable etcd encryption only if you specifically require it for your use case.
279287
====
280288
+
281-
<7> The output includes a custom command that you can run to create a cluster with the same configuration in the future.
289+
<8> The output includes a custom command that you can run to create a cluster with the same configuration in the future.
282290
--
283291
+
284292
As an alternative to using the `--interactive` mode, you can specify the customization options directly when you run the `rosa create cluster` command. Run the `rosa create cluster --help` command to view a list of available CLI options, or see _create cluster_ in _Managing objects with the ROSA CLI_.

modules/rosa-sts-creating-a-cluster-with-customizations-ocm.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,13 @@ Alternatively, you can set your autoscaling preferences for the default machine
264264
** If you deployed your cluster using a single availability zone, select a *Compute node count* from the drop-down menu. This defines the number of compute nodes to provision to the machine pool for the zone.
265265
** If you deployed your cluster using multiple availability zones, select a *Compute node count (per zone)* from the drop-down menu. This defines the number of compute nodes to provision to the machine pool per zone.
266266

267+
. Optional: Select an EC2 Instance Metadata Service (IMDS) configuration - `optional` (default) or `required` - to enforce use of IMDSv2. For more information regarding IMDS, see link:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html[Instance metadata and user data] in the AWS documentation.
268+
+
269+
[IMPORTANT]
270+
====
271+
The Instance Metadata Service settings cannot be changed after your cluster is created.
272+
====
273+
267274
. Optional: Expand *Edit node labels* to add labels to your nodes. Click *Add label* to add more node labels and select *Next*.
268275

269276
. In the *Cluster privacy* section of the *Network configuration* page, select *Public* or *Private* to use either public or private API endpoints and application routes for your cluster.

modules/rosa-sts-interactive-cluster-creation-mode-options.adoc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ The following table describes the interactive cluster creation mode options:
2525
|`OpenShift version`
2626
|Select the version of OpenShift to install, for example {product-version}. The default is the latest version.
2727

28+
|`Configure the use of IMDSv2 for ec2 instances optional/required (optional)`
29+
|Specify whether all EC2 instances will use both v1 and v2 endpoints of EC2 Instance Metadata Service (IMDS)(optional) or only IMDSv2 (required).
30+
2831
|`Installer role ARN`
2932
|If you have more than one set of account roles in your AWS account for your cluster version, a list of installer role ARNs are provided. Select the ARN for the installer role that you want to use with your cluster. The cluster uses the account-wide roles and policies that relate to the selected installer role.
3033

modules/rosa-sts-overview-of-the-default-cluster-specifications.adoc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ endif::[]
1515
[id="rosa-sts-overview-of-the-default-cluster-specifications_{context}"]
1616
= Overview of the default cluster specifications
1717

18-
You can quickly create a
18+
You can quickly create a
1919
ifdef::rosa-hcp[]
20-
{hcp-title}
20+
{hcp-title}
2121
endif::rosa-hcp[]
2222
ifndef::rosa-hcp[]
23-
{product-title} (ROSA)
23+
{product-title} (ROSA)
2424
endif::rosa-hcp[]
2525
cluster with the AWS Security Token Service (STS) by using the default installation options. The following summary describes the default cluster specifications.
2626

@@ -45,6 +45,7 @@ ifndef::rosa-hcp[]
4545
* Default AWS region for installations using the {cluster-manager-first} {hybrid-console-second}: us-east-1 (US East, North Virginia)
4646
endif::rosa-hcp[]
4747
* Default AWS region for installations using the ROSA CLI (`rosa`): Defined by your `aws` CLI configuration
48+
* Default EC2 IMDS endpoints (both v1 and v2) are enabled
4849
* Availability: Single zone for the data plane
4950
* Monitoring for user-defined projects: Enabled
5051

rosa_cluster_admin/rosa_nodes/rosa-managing-worker-nodes.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ include::modules/rosa-osd-node-label-about.adoc[leveloffset=+1]
3131
* For more information about labels, see link:https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/[Kubernetes Labels and Selectors overview].
3232
3333
include::modules/rosa-adding-node-labels.adoc[leveloffset=+2]
34-
include::modules/rosa-imds-machine-pools.adoc[leveloffset=+1]
34+
// include::modules/rosa-imds-machine-pools.adoc[leveloffset=+1]
3535

36-
[role="_additional-resources"]
37-
.Additional resources
36+
// [role="_additional-resources"]
37+
// .Additional resources
3838

39-
* For more information about Instance Metadata Service, see link:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html[Use IMDSv2] in the AWS documentation.
39+
// * For more information about Instance Metadata Service, see link:https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-service.html[Use IMDSv2] in the AWS documentation.
4040

41-
include::modules/rosa-imds-machine-pools-ui.adoc[leveloffset=+2]
42-
include::modules/rosa-imds-machine-pools-cli.adoc[leveloffset=+2]
41+
// include::modules/rosa-imds-machine-pools-ui.adoc[leveloffset=+2]
42+
// include::modules/rosa-imds-machine-pools-cli.adoc[leveloffset=+2]
4343
include::modules/rosa-adding-taints.adoc[leveloffset=+1]
4444
include::modules/rosa-adding-taints-ocm.adoc[leveloffset=+2]
4545
include::modules/rosa-adding-taints-cli.adoc[leveloffset=+2]

rosa_install_access_delete_clusters/rosa-sts-creating-a-cluster-with-customizations.adoc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ include::modules/osd-aws-vpc-required-resources.adoc[leveloffset=+1]
4040
4141
include::modules/rosa-sts-creating-a-cluster-using-customizations.adoc[leveloffset=+1]
4242
include::modules/rosa-sts-creating-a-cluster-with-customizations-ocm.adoc[leveloffset=+2]
43-
4443
[role="_additional-resources"]
4544
.Additional resources
4645
* xref:../cli_reference/rosa_cli/rosa-manage-objects-cli.adoc#rosa-create-cluster-command_rosa-managing-objects-cli[create cluster] in _Managing objects with the ROSA CLI_.

0 commit comments

Comments
 (0)