From 62ce4ebbe0a8e5af5995e09df68c81900d3e5fd5 Mon Sep 17 00:00:00 2001 From: Masashi Tomooka Date: Thu, 27 Jan 2022 09:49:52 +0900 Subject: [PATCH] fix getting started with terraform doc (#1224) --- .../en/preview/getting-started-with-terraform/_index.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/website/content/en/preview/getting-started-with-terraform/_index.md b/website/content/en/preview/getting-started-with-terraform/_index.md index ca93f9adf24b..e75ee5016f84 100644 --- a/website/content/en/preview/getting-started-with-terraform/_index.md +++ b/website/content/en/preview/getting-started-with-terraform/_index.md @@ -86,6 +86,7 @@ module "vpc" { private_subnet_tags = { "kubernetes.io/cluster/${var.cluster_name}" = "owned" + "karpenter.sh/discovery" = var.cluster_name } } @@ -134,6 +135,14 @@ terraform apply -var cluster_name=$CLUSTER_NAME Everything should apply successfully now! +### Create the EC2 Spot Service Linked Role + +This step is only necessary if this is the first time you're using EC2 Spot in this account. More details are available [here](https://docs.aws.amazon.com/batch/latest/userguide/spot_fleet_IAM_role.html). +```bash +aws iam create-service-linked-role --aws-service-name spot.amazonaws.com +# If the role has already been successfully created, you will see: +# An error occurred (InvalidInput) when calling the CreateServiceLinkedRole operation: Service role name AWSServiceRoleForEC2Spot has been taken in this account, please try a different suffix. +``` ### Configure the KarpenterNode IAM Role