Skip to content

Commit ed6d2a7

Browse files
szuecschristopherhein
authored andcommitted
cloud labels can be added to an existing cluster (aws-samples#306)
* cloud labels can be added to an existing cluster * changes as commented
1 parent 7f15a7a commit ed6d2a7

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

ingress-controllers/readme.adoc

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,13 @@ For this tutorial I assume you have GNU sed installed, if not read
235235
commands with `sed` to modify the files according to the `sed` command
236236
being run. If you are running BSD or MacOS you can use `gsed`.
237237

238-
=== Create kops cluster with cloud labels
238+
We need to have cloud labels enabled for this ingress controller to work.
239+
You have 2 options, skip the section which does not fit in your case:
240+
241+
1. <<Create a New Cluster>>
242+
2. <<Modify an Existing Cluster>>
243+
244+
=== Create a New Cluster
239245

240246
Cloud Labels are required to make Kube AWS Ingress Controller work,
241247
because it has to find the AWS Application Load Balancers it manages
@@ -250,13 +256,31 @@ your S3 Bucket name for kops configuration and you kops cluster name:
250256
export KOPS_CLUSTER_NAME=example.cluster.k8s.local
251257

252258

253-
The you create the kops cluster and validate that everything is set up properly.
254-
259+
Then you create the kops cluster and validate that everything is set up properly.
255260

256261
export KOPS_STATE_STORE=s3://${S3_BUCKET}
257262
kops create cluster --name $KOPS_CLUSTER_NAME --zones $AWS_AVAILABILITY_ZONES --cloud-labels kubernetes.io/cluster/$KOPS_CLUSTER_NAME=owned --yes
258263
kops validate cluster
259264

265+
=== Modify an Existing Cluster
266+
267+
To modify your existing kops cluster and update it.
268+
269+
export KOPS_STATE_STORE=s3://${S3_BUCKET}
270+
kops edit cluster $KOPS_CLUSTER_NAME
271+
272+
Add cloudLabels dependent on your $KOPS_CLUSTER_NAME, for example example.cluster.k8s.local:
273+
274+
```
275+
spec:
276+
cloudLabels:
277+
kubernetes.io/cluster/example.cluster.k8s.local: owned
278+
```
279+
280+
Update the cluster with the new configuration:
281+
282+
kops update cluster $KOPS_CLUSTER_NAME --yes
283+
260284

261285
=== IAM role
262286

0 commit comments

Comments
 (0)