Skip to content

Commit 2e8a237

Browse files
authored
Merge pull request #6237 from ahardin-rh/rrati-fork
Added document for labeling AWS resources on existing clusters
2 parents 100fc3f + 6f690c1 commit 2e8a237

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

_topic_map.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,9 @@ Topics:
659659
File: idling_applications
660660
- Name: Analyzing Cluster Capacity
661661
File: cluster_capacity
662+
- Name: Labeling Clusters for Amazon Web Services
663+
File: aws_cluster_labeling
664+
Distros: openshift-origin,openshift-enterprise
662665
- Name: Revision History
663666
File: revhistory_admin_guide
664667
Distros: openshift-enterprise,openshift-dedicated

admin_guide/aws_cluster_labeling.adoc

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
[[admin-guide-aws-cluster-labeling]]
2+
= Labeling Clusters for Amazon Web Services (AWS)
3+
{product-author}
4+
{product-version}
5+
:data-uri:
6+
:icons:
7+
:experimental:
8+
:toc: macro
9+
:toc-title:
10+
11+
toc::[]
12+
13+
== Overview
14+
15+
This topic describes how to label an existing {product-title} cluster running on
16+
Amazon Web Services (AWS).
17+
18+
To correctly identify which resources are associated with a cluster, tag
19+
resources with the key `kubernetes.io/cluster/<name>`, where `<name>` is a unique
20+
name for the cluster. Tagging all resources with the
21+
`kubernetes.io/cluster/<name>` tag avoids potential issues with multiple zones
22+
or multiple clusters.
23+
24+
See
25+
xref:../install_config/configuring_aws.adoc#install-config-configuring-aws[Configuring
26+
AWS] for guidance on configuring AWS variables and {product-title} masters for
27+
AWS.
28+
29+
See xref:../architecture/core_concepts/pods_and_services.adoc#labels[Pods and
30+
Services] to learn more about labeling and tagging in {product-title}.
31+
32+
[[resources-that-need-tags]]
33+
== Resources That Need Tags
34+
There are four types of resources that need to be tagged:
35+
36+
* Instances
37+
* Security Groups
38+
* Load Balancers
39+
* EBS Volumes
40+
41+
[[tagging-an-existing-cluster]]
42+
== Tagging an Existing Cluster
43+
44+
A cluster will use the value of the `kubernetes.io/cluster/<name>` tag to determine which
45+
resources belong to the cluster. Therefore, you must tag all resources with the
46+
key `kubernetes.io/cluster/<name>` and have the same value for that key.
47+
48+
. Tag all instances with `kubernetes.io/cluster/<name>` and a value to be used as the cluster ID.
49+
. Tag any security groups with `kubernetes.io/cluster/<name>` and the same value used for the instances.
50+
. Tag any load balancers with `kubernetes.io/cluster/<name>` and the same value used for the instances.
51+
. Tag all EBS volumes with `kubernetes.io/cluster/<name>` and the same value used for the instances. The EBS Volumes that need to be tagged can found with:
52+
+
53+
[source,bash]
54+
----
55+
$ oc get pv -o json|jq '.items[].spec.awsElasticBlockStore.volumeID'
56+
----
57+
58+
. Restart `atomic-openshift-master` and `atomic-openshift-node` on all nodes:
59+
+
60+
[source,bash]
61+
----
62+
# systemctl restart atomic-openshift-master-api atomic-openshift-master-controller atomic-openshift-node
63+
----

0 commit comments

Comments
 (0)