mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
83 lines
2.1 KiB
Plaintext
83 lines
2.1 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * rosa_hcp/rosa-hcp-quickstart-guide.adoc
|
|
// * rosa_hcp/rosa-hcp-creating-cluster-with-aws-kms-key.adoc
|
|
// * rosa_hcp/rosa-hcp-sts-creating-a-cluster-quickly.adoc
|
|
ifeval::["{context}" == "rosa-hcp-prereqs"]
|
|
:hcp-preqs:
|
|
endif::[]
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="rosa-hcp-vpc-subnet-tagging_{context}"]
|
|
= Tagging your subnets
|
|
|
|
[role="_abstract"]
|
|
ifdef::hcp-preqs[]
|
|
If you created your own VPC to create a {product-title} cluster, you must tag your VPC subnets.
|
|
endif::hcp-preqs[]
|
|
ifndef::hcp-preqs[]
|
|
Before you can use your VPC to create a {product-title} cluster, you must tag your VPC subnets.
|
|
endif::hcp-preqs[]
|
|
Automated service preflight checks verify that these resources are tagged correctly before you can use these resources for a cluster. The following table shows how your resources should be tagged:
|
|
|
|
[cols="3a,8a,8a", options="header"]
|
|
|===
|
|
| Resource
|
|
| Key
|
|
| Value
|
|
|
|
| Public subnet
|
|
| `kubernetes.io/role/elb`
|
|
| `1` (or no value)
|
|
|
|
| Private subnet
|
|
| `kubernetes.io/role/internal-elb`
|
|
| `1` (or no value)
|
|
|
|
|===
|
|
|
|
[NOTE]
|
|
====
|
|
You must tag at least one private subnet and, if applicable, one public subnet.
|
|
====
|
|
|
|
.Prerequisites
|
|
|
|
* You have created a VPC.
|
|
* You have installed the `aws` CLI.
|
|
|
|
.Procedure
|
|
|
|
* Tag your resources in your terminal by running the following commands:
|
|
.. For public subnets, run:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ aws ec2 create-tags --resources <public-subnet-id> --region <aws_region> --tags Key=kubernetes.io/role/elb,Value=1
|
|
----
|
|
.. For private subnets, run:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ aws ec2 create-tags --resources <private-subnet-id> --region <aws_region> --tags Key=kubernetes.io/role/internal-elb,Value=1
|
|
----
|
|
|
|
.Verification
|
|
|
|
* Verify that the tag is correctly applied by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ aws ec2 describe-tags --filters "Name=resource-id,Values=<subnet_id>"
|
|
----
|
|
+
|
|
For example:
|
|
+
|
|
[source,text]
|
|
----
|
|
TAGS Name <subnet-id> subnet <prefix>-subnet-public1-us-east-1a
|
|
TAGS kubernetes.io/role/elb <subnet-id> subnet 1
|
|
----
|
|
ifeval::["{context}" == "rosa-hcp-prereqs"]
|
|
:!hcp-preqs:
|
|
endif::[] |