From 616e2c964579c0c81d0f8607768d5865a0c95166 Mon Sep 17 00:00:00 2001 From: Ellis Tarn Date: Mon, 18 Oct 2021 16:39:25 -0700 Subject: [PATCH] Updating EC2 Spot SLR guidance (#748) * Updating EC2 Spot SLR guidance * pr comments --- TROUBLESHOOTING.md | 11 +++++++++++ website/content/en/docs/getting-started/_index.md | 9 +++++++++ 2 files changed, 20 insertions(+) diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md index f94bd66598c2..89a4883a20f5 100644 --- a/TROUBLESHOOTING.md +++ b/TROUBLESHOOTING.md @@ -2,6 +2,17 @@ ## Known Problems + Solutions + +### Missing Service Linked Role +Unless your AWS account has already onboarded to EC2 Spot, you will need to create the service linked role to avoid `ServiceLinkedRoleCreationNotPermitted`. +``` +AuthFailure.ServiceLinkedRoleCreationNotPermitted: The provided credentials do not have permission to create the service-linked role for EC2 Spot Instances +``` +This can be resolved by creating the [Service Linked Role](https://docs.aws.amazon.com/batch/latest/userguide/spot_fleet_IAM_role.html). +``` +aws iam create-service-linked-role --aws-service-name spot.amazonaws.com +``` + ### Unable to delete nodes after uninstalling Karpenter Karpenter adds a [finalizer](https://github.com/awslabs/karpenter/pull/466) to nodes that it provisions to support graceful node termination. If Karpenter is uninstalled, these finalizers will cause the API Server to block deletion until the finalizers are removed. diff --git a/website/content/en/docs/getting-started/_index.md b/website/content/en/docs/getting-started/_index.md index 10e5932514c3..9adf9e6afd68 100644 --- a/website/content/en/docs/getting-started/_index.md +++ b/website/content/en/docs/getting-started/_index.md @@ -137,6 +137,15 @@ eksctl create iamserviceaccount \ --approve ``` +### 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. +``` + ### Install Karpenter Helm Chart Use helm to deploy Karpenter to the cluster.