You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: website/content/en/preview/concepts/nodeclasses.md
+55-1
Original file line number
Diff line number
Diff line change
@@ -110,6 +110,12 @@ spec:
110
110
# exclusive and can't be specified with other terms.
111
111
# - alias: al2023@v20240703
112
112
113
+
# Optional, each term in the array of capacityReservationSelectorTerms is ORed together.
114
+
capacityReservationSelectorTerms:
115
+
- tags:
116
+
karpenter.sh/discovery: ${CLUSTER_NAME}
117
+
- id: cr-123
118
+
113
119
# Optional, propagates tags to underlying EC2 resources
114
120
tags:
115
121
team: team-a
@@ -430,7 +436,7 @@ spec:
430
436
### AL2
431
437
432
438
{{% alert title="AL2 support dropped at Kubernetes 1.33" color="warning" %}}
433
-
Kubernetes version 1.32 is the last version for which Amazon EKS will release Amazon Linux 2 (AL2) AMIs.
439
+
Kubernetes version 1.32 is the last version for which Amazon EKS will release Amazon Linux 2 (AL2) AMIs.
434
440
{{% /alert %}}
435
441
436
442
{{% alert title="Note" color="primary" %}}
@@ -846,6 +852,54 @@ Specify using ids:
846
852
- id: "ami-456"
847
853
```
848
854
855
+
## spec.capacityReservationSelectorTerms
856
+
857
+
Capacity Reservation Selector Terms allow you to select [on-demand capacity reservations](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-capacity-reservations.html), which will be made available to NodePools which select the given EC2NodeClass.
858
+
Karpenter will prioritize utilizing the capacity in these reservations before falling back to on-demand and spot.
859
+
Capacity reservations can be discovered using ids or tags.
860
+
861
+
This selection logic is modeled as terms.
862
+
A term can specify an ID or a set of tags to select against.
863
+
When specifying tags, it will select all capacity reservations accessible from the account with matching tags.
864
+
This can be further restricted by specifying an owner ID.
865
+
866
+
#### Examples
867
+
868
+
Select the reservations with the given IDs:
869
+
870
+
```yaml
871
+
spec:
872
+
capacityReservationSelectorTerms:
873
+
- id: cr-123
874
+
- id: cr-456
875
+
```
876
+
877
+
Select the reservations by tags:
878
+
879
+
```yaml
880
+
spec:
881
+
capacityReservationSelectorTerms:
882
+
# Select all capacity reservations which have both matching tags
883
+
- tags:
884
+
key1: foo
885
+
key2: bar
886
+
# Additionally, select all capacity reservations with the following matching tag
887
+
- tags:
888
+
key3: foobar
889
+
```
890
+
891
+
Select by tags and owner ID:
892
+
893
+
```yaml
894
+
spec:
895
+
# Select all capacity reservations with the matching tags which are also owned by
896
+
# the specified account.
897
+
capacityReservationSelectorTerms:
898
+
- tags:
899
+
key: foo
900
+
ownerID: 012345678901
901
+
```
902
+
849
903
## spec.tags
850
904
851
905
Karpenter adds tags to all resources it creates, including EC2 Instances, EBS volumes, and Launch Templates. The default set of tags are listed below.
Karpenter supports specifying capacity type, which is analogous to [EC2 purchase options](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-purchasing-options.html).
256
257
257
-
Karpenter prioritizes Spot offerings if the NodePool allows Spot and on-demand instances (note that in this scenario any Spot instances priced higher than the cheapest on-demand instance will be temporarily removed from consideration).
258
-
If the provider API (e.g. EC2 Fleet's API) indicates Spot capacity is unavailable, Karpenter caches that result across all attempts to provision EC2 capacity for that instance type and zone for the next 3 minutes.
259
-
If there are no other possible offerings available for Spot, Karpenter will attempt to provision on-demand instances, generally within milliseconds.
258
+
If a NodePool is compatible with multiple capacity types, Karpenter will prioritize `reserved` capacity, followed by `spot`, then finally `on-demand`.
259
+
If the provider API (e.g. EC2 Fleet's API) indicates capacity is unavailable, Karpenter caches that result across all attempts to provision EC2 capacity for that instance type and zone for the next 3 minutes.
260
+
If there are no other possible offerings available for a higher priority capacity type, Karpenter will attempt to fallback to a lower priority capacity type, generally within milliseconds.
260
261
261
262
Karpenter also allows `karpenter.sh/capacity-type` to be used as a topology key for enforcing topology-spread.
Copy file name to clipboardexpand all lines: website/content/en/preview/concepts/scheduling.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -154,7 +154,7 @@ Take care to ensure the label domains are correct. A well known label like `karp
154
154
| node.kubernetes.io/windows-build | 10.0.17763 | Windows OS build in the format "MajorVersion.MinorVersion.BuildNumber". Can be `10.0.17763` for WS2019, or `10.0.20348` for WS2022. ([k8s](https://kubernetes.io/docs/reference/labels-annotations-taints/#nodekubernetesiowindows-build)) |
155
155
| kubernetes.io/os | linux | Operating systems are defined by [GOOS values](https://github.com/golang/go/blob/master/src/internal/syslist/syslist.go) (`KnownOS`) on the instance |
156
156
| kubernetes.io/arch | amd64 | Architectures are defined by [GOARCH values](https://github.com/golang/go/blob/master/src/internal/syslist/syslist.go) (`KnownArch`) on the instance |
0 commit comments