Skip to content

Commit

Permalink
add step for tagging subnets (aws#543)
Browse files Browse the repository at this point in the history
* readd step for tagging subnets

* Update website/content/en/docs/getting-started/_index.md

Co-authored-by: Alex Kestner <[email protected]>

* Update website/content/en/docs/getting-started/_index.md

Co-authored-by: Alex Kestner <[email protected]>

* Apply suggestions from code review

Co-authored-by: Alex Kestner <[email protected]>

* Update website/content/en/docs/getting-started/_index.md

* Update website/content/en/docs/getting-started/_index.md

Co-authored-by: Alex Kestner <[email protected]>
Co-authored-by: Ellis Tarn <[email protected]>
  • Loading branch information
3 people committed Jul 26, 2021
1 parent 55e7e41 commit 839ae91
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions website/content/en/docs/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,21 @@ Karpenter will provision EC2 instances in your account.

Additionally, the configuration file sets up [IAM Roles for Service Accounts](https://docs.aws.amazon.com/emr/latest/EMR-on-EKS-DevelopmentGuide/setting-up-enable-IAM.html) (IRSA), which grants Karpenter permissions like launching instances.

### Tag Subnets

Karpenter discovers subnets tagged `kubernetes.io/cluster/$CLUSTER_NAME`. Add this tag to subnets associated configured for your cluster.
Retreive the subnet IDs and tag them with the cluster name.

```bash
SUBNET_IDS=$(aws cloudformation describe-stacks \
--stack-name eksctl-${CLUSTER_NAME}-cluster \
--query 'Stacks[].Outputs[?OutputKey==`SubnetsPrivate`].OutputValue' \
--output text)
aws ec2 create-tags \
--resources $(echo $SUBNET_IDS | tr ',' '\n') \
--tags Key="kubernetes.io/cluster/${CLUSTER_NAME}",Value=
```

### Setup an IAM InstanceProfile for your Nodes

Instances launched by Karpenter must run with an InstanceProfile that grants permissions necessary to run containers and configure networking. Karpenter discovers the InstanceProfile using the name `KarpenterNodeRole-${ClusterName}`.
Expand Down

0 comments on commit 839ae91

Please sign in to comment.