Skip to content

Commit

Permalink
revise provisioner api description (#1419)
Browse files Browse the repository at this point in the history
* revise prov api desc

* revise

* Update website/content/en/preview/provisioner.md

Co-authored-by: Ellis Tarn <ellistarn@gmail.com>
  • Loading branch information
geoffcline and ellistarn committed Mar 1, 2022
1 parent 31c7f1a commit 0dff9db
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions website/content/en/preview/provisioner.md
Expand Up @@ -48,6 +48,11 @@ spec:
operator: In
values: ["spot", "on-demand"]

# Karpenter provides the ability to specify a few additional Kubelet args.
# These are all optional and provide support for additional customization and use cases.
kubeletConfiguration:
clusterDNS: ["10.0.1.100"]

# Resource limits constrain the total size of the cluster.
# Limits prevent Karpenter from creating new instances once the limit is exceeded.
limits:
Expand All @@ -59,6 +64,22 @@ spec:
provider: {}
```

## Node deprovisioning

If neither of these values are set, Karpenter will *not* delete instances. It is recommended to set the `ttlSecondsAfterEmpty` value, to enable scale down of the cluster.

### spec.ttlSecondsAfterEmpty

Setting a value here enables Karpenter to delete empty/unnecessary instances. DaemonSets are excluded from considering a node "empty". This value is in seconds.

### spec.ttlSecondsUntilExpired

Setting a value here enables node expiry. After nodes reach the defined age in seconds, they will be deleted, even if in use. This enables nodes to effectively be periodically "upgraded" by replacing them with newly provisioned instances.

Note that Karpenter does not automatically add jitter to this value. If multiple instances are created in a small amount of time, they will expire at very similar times. Consider defining a [pod disruption budget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) to prevent excessive workload disruption.



## spec.requirements

Kubernetes defines the following [Well-Known Labels](https://kubernetes.io/docs/reference/labels-annotations-taints/), and cloud providers (e.g., AWS) implement them. They are defined at the "spec.requirements" section of the Provisioner API.
Expand Down Expand Up @@ -158,7 +179,7 @@ spec:
clusterDNS: ["10.0.1.100"]
```

## spec.limits
## spec.limits.resources

The provisioner spec includes a limits section (`spec.limits.resources`), which constrains the maximum amount of resources that the provisioner will manage.

Expand All @@ -172,8 +193,6 @@ Karpenter stops allocating resources once at least one resource limit is met/exc

Review the [resource limit task](../tasks/set-resource-limits) for more information.



## spec.provider

This section is cloud provider specific. Reference the appropriate documentation:
Expand Down

0 comments on commit 0dff9db

Please sign in to comment.