Skip to content

Commit

Permalink
Add minor edits for minValues with formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-innis committed Mar 19, 2024
1 parent e5f57ba commit f6d7dcf
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 19 deletions.
19 changes: 11 additions & 8 deletions website/content/en/docs/concepts/nodepools.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ spec:
operator: In
values: ["c", "m", "r"]
# minValues here enforces the scheduler to consider at least that number of unique instance-category to schedule the pods.
# This field is ALPHA and can be dropped or replaced at any time
minValues: 2
- key: "karpenter.k8s.aws/instance-family"
operator: In
Expand Down Expand Up @@ -178,7 +179,9 @@ These well-known labels may be specified at the NodePool level, or in a workload
For example, an instance type may be specified using a nodeSelector in a pod spec. If the instance type requested is not included in the NodePool list and the NodePool has instance type requirements, Karpenter will not create a node or schedule the pod.
### Instance Types
### Well-Known Labels
#### Instance Types
- key: `node.kubernetes.io/instance-type`
- key: `karpenter.k8s.aws/instance-family`
Expand All @@ -189,7 +192,7 @@ Generally, instance types should be a list and not a single value. Leaving these

Review [AWS instance types](../instance-types). Most instance types are supported with the exclusion of [non-HVM](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/virtualization_types.html).

### Availability Zones
#### Availability Zones

- key: `topology.kubernetes.io/zone`
- value example: `us-east-1c`
Expand All @@ -200,7 +203,7 @@ Karpenter can be configured to create nodes in a particular zone. Note that the
[Learn more about Availability Zone
IDs.](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html)

### Architecture
#### Architecture

- key: `kubernetes.io/arch`
- values
Expand All @@ -209,15 +212,15 @@ IDs.](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html)

Karpenter supports `amd64` nodes, and `arm64` nodes.

### Operating System
#### Operating System
- key: `kubernetes.io/os`
- values
- `linux`
- `windows`

Karpenter supports `linux` and `windows` operating systems.

### Capacity Type
#### Capacity Type

- key: `karpenter.sh/capacity-type`
- values
Expand All @@ -230,6 +233,8 @@ Karpenter prioritizes Spot offerings if the NodePool allows Spot and on-demand i

Karpenter also allows `karpenter.sh/capacity-type` to be used as a topology key for enforcing topology-spread.

### Min Values

Along with the combination of [key,operator,values] in the requirements, Karpenter also supports `minValues` in the NodePool requirements block, allowing the scheduler to be aware of user-specified flexibility minimums while scheduling pods to a cluster. If Karpenter cannot meet this minimum flexibility for each key when scheduling a pod, it will fail the scheduling loop for that NodePool, either falling back to another NodePool which meets the pod requirements or failing scheduling the pod altogether.

For example, the below spec will use spot instance type for all provisioned instances and enforces `minValues` to various keys where it is defined
Expand Down Expand Up @@ -364,9 +369,7 @@ kubelet:

### Reserved Resources

Karpenter will automatically configure the system and kube reserved resource requests on the fly on your behalf.
These requests are used to configure your node and to make scheduling decisions for your pods.
If you have specific requirements or know that you will have additional capacity requirements, you can optionally override the `--system-reserved` configuration defaults with the `.spec.template.spec.kubelet.systemReserved` values and the `--kube-reserved` configuration defaults with the `.spec.template.spec.kubelet.kubeReserved` values.
Karpenter will automatically configure the system and kube reserved resource requests on the fly on your behalf. These requests are used to configure your node and to make scheduling decisions for your pods. If you have specific requirements or know that you will have additional capacity requirements, you can optionally override the `--system-reserved` configuration defaults with the `.spec.template.spec.kubelet.systemReserved` values and the `--kube-reserved` configuration defaults with the `.spec.template.spec.kubelet.kubeReserved` values.

{{% alert title="Note" color="primary" %}}
Karpenter considers these reserved resources when computing the allocatable ephemeral storage on a given instance type.
Expand Down
16 changes: 10 additions & 6 deletions website/content/en/preview/concepts/nodepools.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ spec:
operator: In
values: ["c", "m", "r"]
# minValues here enforces the scheduler to consider at least that number of unique instance-category to schedule the pods.
# This field is ALPHA and can be dropped or replaced at any time
minValues: 2
- key: "karpenter.k8s.aws/instance-family"
operator: In
Expand Down Expand Up @@ -178,7 +179,9 @@ These well-known labels may be specified at the NodePool level, or in a workload
For example, an instance type may be specified using a nodeSelector in a pod spec. If the instance type requested is not included in the NodePool list and the NodePool has instance type requirements, Karpenter will not create a node or schedule the pod.
### Instance Types
### Well-Known Labels
#### Instance Types
- key: `node.kubernetes.io/instance-type`
- key: `karpenter.k8s.aws/instance-family`
Expand All @@ -189,7 +192,7 @@ Generally, instance types should be a list and not a single value. Leaving these

Review [AWS instance types](../instance-types). Most instance types are supported with the exclusion of [non-HVM](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/virtualization_types.html).

### Availability Zones
#### Availability Zones

- key: `topology.kubernetes.io/zone`
- value example: `us-east-1c`
Expand All @@ -200,7 +203,7 @@ Karpenter can be configured to create nodes in a particular zone. Note that the
[Learn more about Availability Zone
IDs.](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html)

### Architecture
#### Architecture

- key: `kubernetes.io/arch`
- values
Expand All @@ -209,15 +212,15 @@ IDs.](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html)

Karpenter supports `amd64` nodes, and `arm64` nodes.

### Operating System
#### Operating System
- key: `kubernetes.io/os`
- values
- `linux`
- `windows`

Karpenter supports `linux` and `windows` operating systems.

### Capacity Type
#### Capacity Type

- key: `karpenter.sh/capacity-type`
- values
Expand All @@ -230,6 +233,8 @@ Karpenter prioritizes Spot offerings if the NodePool allows Spot and on-demand i

Karpenter also allows `karpenter.sh/capacity-type` to be used as a topology key for enforcing topology-spread.

### Min Values

Along with the combination of [key,operator,values] in the requirements, Karpenter also supports `minValues` in the NodePool requirements block, allowing the scheduler to be aware of user-specified flexibility minimums while scheduling pods to a cluster. If Karpenter cannot meet this minimum flexibility for each key when scheduling a pod, it will fail the scheduling loop for that NodePool, either falling back to another NodePool which meets the pod requirements or failing scheduling the pod altogether.

For example, the below spec will use spot instance type for all provisioned instances and enforces `minValues` to various keys where it is defined
Expand Down Expand Up @@ -373,7 +378,6 @@ These defaults are based on the defaults on Karpenter's supported AMI families,
You should be aware of the CPU and memory default calculation when using Custom AMI Families. If they don't align, there may be a difference in Karpenter's computed allocatable ephemeral storage and the actually ephemeral storage available on the node.
{{% /alert %}}


### Eviction Thresholds

The kubelet supports eviction thresholds by default. When enough memory or file system pressure is exerted on the node, the kubelet will begin to evict pods to ensure that system daemons and other system processes can continue to run in a healthy manner.
Expand Down
15 changes: 10 additions & 5 deletions website/content/en/v0.35/concepts/nodepools.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ spec:
operator: In
values: ["c", "m", "r"]
# minValues here enforces the scheduler to consider at least that number of unique instance-category to schedule the pods.
# This field is ALPHA and can be dropped or replaced at any time
minValues: 2
- key: "karpenter.k8s.aws/instance-family"
operator: In
Expand Down Expand Up @@ -178,7 +179,9 @@ These well-known labels may be specified at the NodePool level, or in a workload
For example, an instance type may be specified using a nodeSelector in a pod spec. If the instance type requested is not included in the NodePool list and the NodePool has instance type requirements, Karpenter will not create a node or schedule the pod.
### Instance Types
### Well-Known Labels
#### Instance Types
- key: `node.kubernetes.io/instance-type`
- key: `karpenter.k8s.aws/instance-family`
Expand All @@ -189,7 +192,7 @@ Generally, instance types should be a list and not a single value. Leaving these

Review [AWS instance types](../instance-types). Most instance types are supported with the exclusion of [non-HVM](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/virtualization_types.html).

### Availability Zones
#### Availability Zones

- key: `topology.kubernetes.io/zone`
- value example: `us-east-1c`
Expand All @@ -200,7 +203,7 @@ Karpenter can be configured to create nodes in a particular zone. Note that the
[Learn more about Availability Zone
IDs.](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html)

### Architecture
#### Architecture

- key: `kubernetes.io/arch`
- values
Expand All @@ -209,15 +212,15 @@ IDs.](https://docs.aws.amazon.com/ram/latest/userguide/working-with-az-ids.html)

Karpenter supports `amd64` nodes, and `arm64` nodes.

### Operating System
#### Operating System
- key: `kubernetes.io/os`
- values
- `linux`
- `windows`

Karpenter supports `linux` and `windows` operating systems.

### Capacity Type
#### Capacity Type

- key: `karpenter.sh/capacity-type`
- values
Expand All @@ -230,6 +233,8 @@ Karpenter prioritizes Spot offerings if the NodePool allows Spot and on-demand i

Karpenter also allows `karpenter.sh/capacity-type` to be used as a topology key for enforcing topology-spread.

### Min Values

Along with the combination of [key,operator,values] in the requirements, Karpenter also supports `minValues` in the NodePool requirements block, allowing the scheduler to be aware of user-specified flexibility minimums while scheduling pods to a cluster. If Karpenter cannot meet this minimum flexibility for each key when scheduling a pod, it will fail the scheduling loop for that NodePool, either falling back to another NodePool which meets the pod requirements or failing scheduling the pod altogether.

For example, the below spec will use spot instance type for all provisioned instances and enforces `minValues` to various keys where it is defined
Expand Down

0 comments on commit f6d7dcf

Please sign in to comment.