Skip to content

Commit

Permalink
Doc updates in support of promoting capacity-type to a well known lab…
Browse files Browse the repository at this point in the history
…el (for v0.4.3 release) (#790)

Co-authored-by: Elton Pinto <[email protected]>
  • Loading branch information
eptiger and Elton Pinto authored Nov 15, 2021
1 parent 07409c1 commit 53cd6c4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions website/content/en/docs/cloud-providers/AWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ IDs.](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html)

### Capacity Type

- key: `node.k8s.aws/capacity-type`
- key: `karpenter.sh/capacity-type`
- values
- `on-demand` (default)
- `spot`
Expand All @@ -82,7 +82,7 @@ be used for critical workloads that do not tolerate interruptions.
```yaml
spec:
requirements:
- key: node.k8s.aws/capacity-type
- key: karpenter.sh/capacity-type
operator: In
values: ["spot", "on-demand"]
```
Expand All @@ -94,7 +94,7 @@ spec:
template:
spec:
nodeSelector:
node.k8s.aws/capacity-type: spot
karpenter.sh/capacity-type: spot
```

### Architecture
Expand Down
2 changes: 1 addition & 1 deletion website/content/en/docs/faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ No. Provisioners work in tandem with the Kube Scheduler. When capacity is uncons
### How should I define scheduling constraints?
Karpenter takes a layered approach to scheduling constraints. Karpenter comes with a set of global defaults, which may be overriden by Provisioner-level defaults. Further, these may be overriden by pod scheduling constraints. This model requires minimal configuration for most use cases, and supports diverse workloads using a single Provisioner.
### Does Karpenter support node selectors?
Yes. Node selectors are an opt-in mechanism which allow users to specify the nodes on which a pod can scheduled. Karpenter recognizes [well-known node selectors](https://kubernetes.io/docs/reference/labels-annotations-taints/) on unschedulable pods and uses them to constrain the nodes it provisions. You can read more about the well-known node selectors supported by Karpenter in the [Concepts](/docs/concepts/#well-known-labels) documentation. For example, `node.kubernetes.io/instance-type`, `topology.kubernetes.io/zone`, `kubernetes.io/os`, `kubernetes.io/arch` are supported, and will ensure that provisioned nodes are constrained accordingly. Additionally, users may specify arbitrary labels, which will be automatically applied to every node launched by the Provisioner.
Yes. Node selectors are an opt-in mechanism which allow users to specify the nodes on which a pod can scheduled. Karpenter recognizes [well-known node selectors](https://kubernetes.io/docs/reference/labels-annotations-taints/) on unschedulable pods and uses them to constrain the nodes it provisions. You can read more about the well-known node selectors supported by Karpenter in the [Concepts](/docs/concepts/#well-known-labels) documentation. For example, `node.kubernetes.io/instance-type`, `topology.kubernetes.io/zone`, `kubernetes.io/os`, `kubernetes.io/arch`, `karpenter.sh/capacity-type` are supported, and will ensure that provisioned nodes are constrained accordingly. Additionally, users may specify arbitrary labels, which will be automatically applied to every node launched by the Provisioner.
<!-- todo defaults+overrides -->
### Does Karpenter support taints?
Yes. Taints are an opt-out mechanism which allows users to specify the nodes on which a pod cannot be scheduled. Unlike node selectors, Karpenter does not automatically taint nodes in response to pod tolerations. Similar to node selectors, users may specify taints on their Provisioner, which will be automatically added to every node it provisions. This means that if a Provisioner is configured with taints, any incoming pods will not be scheduled unless the taints are tolerated.
Expand Down
2 changes: 1 addition & 1 deletion website/content/en/docs/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ metadata:
name: default
spec:
requirements:
- key: node.k8s.aws/capacity-type
- key: karpenter.sh/capacity-type
operator: In
values: ["spot"]
provider:
Expand Down
2 changes: 1 addition & 1 deletion website/content/en/docs/provisioner-crd.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ spec:
- key: "kubernetes.io/os" # If not included, all operating systems are considered
operator: In
values: ["linux"]
- key: "node.k8s.aws/capacity-type" # If not included, the webhook for the AWS cloud provider will default to on-demand
- key: "karpenter.sh/capacity-type" # If not included, the webhook for the AWS cloud provider will default to on-demand
operator: In
values: ["spot", "on-demand"]
# These fields vary per cloud provider, see your cloud provider specific documentation
Expand Down

0 comments on commit 53cd6c4

Please sign in to comment.