forked from aws/karpenter-provider-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add al2023 example manifests (aws#5748)
- Loading branch information
Showing
1 changed file
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
# This example NodePool will provision instances using the AL2023 EKS-Optimized AMI. | ||
--- | ||
apiVersion: karpenter.sh/v1beta1 | ||
kind: NodePool | ||
metadata: | ||
name: default | ||
annotations: | ||
kubernetes.io/description: "General purpose NodePool for generic workloads" | ||
spec: | ||
template: | ||
spec: | ||
requirements: | ||
- key: kubernetes.io/arch | ||
operator: In | ||
values: ["amd64"] | ||
- key: kubernetes.io/os | ||
operator: In | ||
values: ["linux"] | ||
- key: karpenter.sh/capacity-type | ||
operator: In | ||
values: ["on-demand"] | ||
- key: karpenter.k8s.aws/instance-category | ||
operator: In | ||
values: ["c", "m", "r"] | ||
- key: karpenter.k8s.aws/instance-generation | ||
operator: Gt | ||
values: ["2"] | ||
nodeClassRef: | ||
name: al2023 | ||
--- | ||
apiVersion: karpenter.k8s.aws/v1beta1 | ||
kind: EC2NodeClass | ||
metadata: | ||
name: al2023 | ||
annotations: | ||
kubernetes.io/description: "EC2NodeClass for running Amazon Linux 2023 nodes with custom user data" | ||
spec: | ||
amiFamily: AL2023 # Amazon Linux 2023 | ||
role: "KarpenterNodeRole-${CLUSTER_NAME}" # replace with your cluster name | ||
subnetSelectorTerms: | ||
- tags: | ||
karpenter.sh/discovery: "${CLUSTER_NAME}" # replace with your cluster name | ||
securityGroupSelectorTerms: | ||
- tags: | ||
karpenter.sh/discovery: "${CLUSTER_NAME}" # replace with your cluster name | ||
userData: | | ||
MIME-Version: 1.0 | ||
Content-Type: multipart/mixed; boundary="//" | ||
--// | ||
Content-Type: application/node.eks.aws | ||
# Example custom nodeconfig which mounts individual drives on an instance | ||
apiVersion: node.eks.aws/v1alpha1 | ||
kind: NodeConfig | ||
spec: | ||
instance: | ||
localStorage: | ||
strategy: Mount | ||
--// | ||
Content-Type: text/x-shellscript; charset="us-ascii" | ||
#!/bin/bash | ||
echo "Hello, AL2023!" | ||
--// |