From 5495bfb16feca9f5c1a293f2ab49ef50d87ac5d3 Mon Sep 17 00:00:00 2001 From: Brandon Wagner Date: Thu, 21 Jul 2022 07:40:21 -0500 Subject: [PATCH] add nth docs to getting started guide (#2160) --- .../getting-started-with-eksctl/_index.md | 18 +++++++++++++----- .../scripts/step12-install-nth.sh | 10 ++++++++++ ...rovisioner.sh => step13-add-provisioner.sh} | 0 ...h => step14-automatic-node-provisioning.sh} | 0 ...rovisioning.sh => step15-deprovisioning.sh} | 0 ...15-delete-node.sh => step16-delete-node.sh} | 0 .../{step16-cleanup.sh => step17-cleanup.sh} | 0 7 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step12-install-nth.sh rename website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/{step12-add-provisioner.sh => step13-add-provisioner.sh} (100%) rename website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/{step13-automatic-node-provisioning.sh => step14-automatic-node-provisioning.sh} (100%) rename website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/{step14-deprovisioning.sh => step15-deprovisioning.sh} (100%) rename website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/{step15-delete-node.sh => step16-delete-node.sh} (100%) rename website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/{step16-cleanup.sh => step17-cleanup.sh} (100%) diff --git a/website/content/en/preview/getting-started/getting-started-with-eksctl/_index.md b/website/content/en/preview/getting-started/getting-started-with-eksctl/_index.md index 0b70848d4a5b..96683385be8a 100644 --- a/website/content/en/preview/getting-started/getting-started-with-eksctl/_index.md +++ b/website/content/en/preview/getting-started/getting-started-with-eksctl/_index.md @@ -134,6 +134,14 @@ The new stack has only one user, `admin`, and the password is stored in a secret {{% script file="./content/en/{VERSION}/getting-started/getting-started-with-eksctl/scripts/step11-grafana-get-password.sh" language="bash"%}} +#### Deploy the AWS Node Termination Handler to handle Spot interruptions gracefully (optional) + +The following commands will deploy the AWS Node Termination Handler as a DaemonSet to run on Spot nodes to handle spot interruption notifications, +spot rebalance recommendations, and EC2 scheduled maintenance events. Learn more about the AWS Node Termination Handler and more advanced configurations +[here](https://github.com/aws/aws-node-termination-handler). + +{{% script file="./content/en/{VERSION}/getting-started/getting-started-with-eksctl/scripts/step12-install-nth.sh" language="bash"%}} + ### Provisioner A single Karpenter provisioner is capable of handling many different pod @@ -154,7 +162,7 @@ Review the [provisioner CRD]({{}}) for more informa Note: This provisioner will create capacity as long as the sum of all created capacity is less than the specified limit. -{{% script file="./content/en/{VERSION}/getting-started/getting-started-with-eksctl/scripts/step12-add-provisioner.sh" language="bash"%}} +{{% script file="./content/en/{VERSION}/getting-started/getting-started-with-eksctl/scripts/step13-add-provisioner.sh" language="bash"%}} ## First Use @@ -165,14 +173,14 @@ Create some pods using a deployment, and watch Karpenter provision nodes in resp This deployment uses the [pause image](https://www.ianlewis.org/en/almighty-pause-container) and starts with zero replicas. -{{% script file="./content/en/{VERSION}/getting-started/getting-started-with-eksctl/scripts/step13-automatic-node-provisioning.sh" language="bash"%}} +{{% script file="./content/en/{VERSION}/getting-started/getting-started-with-eksctl/scripts/step14-automatic-node-provisioning.sh" language="bash"%}} ### Automatic Node Termination Now, delete the deployment. After 30 seconds (`ttlSecondsAfterEmpty`), Karpenter should terminate the now empty nodes. -{{% script file="./content/en/{VERSION}/getting-started/getting-started-with-eksctl/scripts/step14-deprovisioning.sh" language="bash"%}} +{{% script file="./content/en/{VERSION}/getting-started/getting-started-with-eksctl/scripts/step15-deprovisioning.sh" language="bash"%}} ### Manual Node Termination @@ -182,10 +190,10 @@ finalizer to the node object, which blocks deletion until all pods are drained and the instance is terminated. Keep in mind, this only works for nodes provisioned by Karpenter. -{{% script file="./content/en/{VERSION}/getting-started/getting-started-with-eksctl/scripts/step15-delete-node.sh" language="bash"%}} +{{% script file="./content/en/{VERSION}/getting-started/getting-started-with-eksctl/scripts/step16-delete-node.sh" language="bash"%}} ## Cleanup To avoid additional charges, remove the demo infrastructure from your AWS account. -{{% script file="./content/en/{VERSION}/getting-started/getting-started-with-eksctl/scripts/step16-cleanup.sh" language="bash"%}} +{{% script file="./content/en/{VERSION}/getting-started/getting-started-with-eksctl/scripts/step17-cleanup.sh" language="bash"%}} diff --git a/website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step12-install-nth.sh b/website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step12-install-nth.sh new file mode 100644 index 000000000000..ee5866453e3c --- /dev/null +++ b/website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step12-install-nth.sh @@ -0,0 +1,10 @@ +helm repo add eks https://aws.github.io/eks-charts +helm repo update + +helm upgrade --install --namespace aws-node-termination-handler --create-namespace \ + aws-node-termination-handler eks/aws-node-termination-handler \ + --set enableSpotInterruptionDraining="true" \ + --set enableRebalanceMonitoring="true" \ + --set enableRebalanceDraining="true" \ + --set enableScheduledEventDraining="true" \ + --set nodeSelector."karpenter\.sh/capacity-type"=spot diff --git a/website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step12-add-provisioner.sh b/website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step13-add-provisioner.sh similarity index 100% rename from website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step12-add-provisioner.sh rename to website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step13-add-provisioner.sh diff --git a/website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step13-automatic-node-provisioning.sh b/website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step14-automatic-node-provisioning.sh similarity index 100% rename from website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step13-automatic-node-provisioning.sh rename to website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step14-automatic-node-provisioning.sh diff --git a/website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step14-deprovisioning.sh b/website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step15-deprovisioning.sh similarity index 100% rename from website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step14-deprovisioning.sh rename to website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step15-deprovisioning.sh diff --git a/website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step15-delete-node.sh b/website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step16-delete-node.sh similarity index 100% rename from website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step15-delete-node.sh rename to website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step16-delete-node.sh diff --git a/website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step16-cleanup.sh b/website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step17-cleanup.sh similarity index 100% rename from website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step16-cleanup.sh rename to website/content/en/preview/getting-started/getting-started-with-eksctl/scripts/step17-cleanup.sh