Skip to content

Commit

Permalink
revise prov api desc
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffcline committed Feb 25, 2022
1 parent b26951a commit 45fa4fe
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions website/content/en/v0.6.3/provisioner.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ 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.
spec:
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 +65,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.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. This functionality may be called "repaving" or "rehydrating".

Note that Karpenter does not automatically add skew 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.

This value is in seconds.

### 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.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 +180,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 +194,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 45fa4fe

Please sign in to comment.