Skip to content

Commit

Permalink
add nth docs to getting started guide (#2160)
Browse files Browse the repository at this point in the history
  • Loading branch information
bwagner5 authored Jul 21, 2022
1 parent 28c2e3d commit 5495bfb
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -154,7 +162,7 @@ Review the [provisioner CRD]({{<ref "../../provisioner.md" >}}) 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

Expand All @@ -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

Expand All @@ -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"%}}
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 5495bfb

Please sign in to comment.