From f6d7dcfff1bdc9dd65d124f6c5310effd5c8a7a0 Mon Sep 17 00:00:00 2001 From: Jonathan Innis Date: Tue, 19 Mar 2024 15:57:06 +0100 Subject: [PATCH] Add minor edits for minValues with formatting --- website/content/en/docs/concepts/nodepools.md | 19 +++++++++++-------- .../content/en/preview/concepts/nodepools.md | 16 ++++++++++------ .../content/en/v0.35/concepts/nodepools.md | 15 ++++++++++----- 3 files changed, 31 insertions(+), 19 deletions(-) diff --git a/website/content/en/docs/concepts/nodepools.md b/website/content/en/docs/concepts/nodepools.md index f890569adea3..d679bb5f4373 100644 --- a/website/content/en/docs/concepts/nodepools.md +++ b/website/content/en/docs/concepts/nodepools.md @@ -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 @@ -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` @@ -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` @@ -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 @@ -209,7 +212,7 @@ 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` @@ -217,7 +220,7 @@ Karpenter supports `amd64` nodes, and `arm64` nodes. Karpenter supports `linux` and `windows` operating systems. -### Capacity Type +#### Capacity Type - key: `karpenter.sh/capacity-type` - values @@ -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 @@ -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. diff --git a/website/content/en/preview/concepts/nodepools.md b/website/content/en/preview/concepts/nodepools.md index 8964c5dd4781..d679bb5f4373 100644 --- a/website/content/en/preview/concepts/nodepools.md +++ b/website/content/en/preview/concepts/nodepools.md @@ -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 @@ -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` @@ -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` @@ -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 @@ -209,7 +212,7 @@ 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` @@ -217,7 +220,7 @@ Karpenter supports `amd64` nodes, and `arm64` nodes. Karpenter supports `linux` and `windows` operating systems. -### Capacity Type +#### Capacity Type - key: `karpenter.sh/capacity-type` - values @@ -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 @@ -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. diff --git a/website/content/en/v0.35/concepts/nodepools.md b/website/content/en/v0.35/concepts/nodepools.md index 9937cd29a095..d679bb5f4373 100644 --- a/website/content/en/v0.35/concepts/nodepools.md +++ b/website/content/en/v0.35/concepts/nodepools.md @@ -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 @@ -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` @@ -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` @@ -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 @@ -209,7 +212,7 @@ 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` @@ -217,7 +220,7 @@ Karpenter supports `amd64` nodes, and `arm64` nodes. Karpenter supports `linux` and `windows` operating systems. -### Capacity Type +#### Capacity Type - key: `karpenter.sh/capacity-type` - values @@ -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