diff --git a/website/content/en/preview/concepts/nodeclasses.md b/website/content/en/preview/concepts/nodeclasses.md index a7fefbfeb1ee..bfbe1555953b 100644 --- a/website/content/en/preview/concepts/nodeclasses.md +++ b/website/content/en/preview/concepts/nodeclasses.md @@ -574,6 +574,17 @@ spec: encrypted: true ``` +### AL2023 +```yaml +spec: + blockDeviceMappings: + - deviceName: /dev/xvda + ebs: + volumeSize: 20Gi + volumeType: gp3 + encrypted: true +``` + ### Bottlerocket ```yaml spec: @@ -639,6 +650,9 @@ The disks must be formatted & mounted in a RAID0 and be the underlying filesyste On AL2, Karpenter automatically configures the disks through an additional boostrap argument (`--local-disks raid0`). The device name is `/dev/md/0` and its mount point is `/mnt/k8s-disks/0`. You should ensure any additional disk setup does not interfere with these. +### AL2023 +On AL2023, local disks are configured as raid0 by default, regardless of this field's value. Like AL2, the device name is `dev/md/0` and its mount point is `/mnt/k8s-disks/0`. You should ensure any additional disk setup does not interfere with these. + #### Others For all other AMI families, you must configure the disks yourself. Check out the [`setup-local-disks`](https://github.com/awslabs/amazon-eks-ami/blob/master/files/bin/setup-local-disks) script in [amazon-eks-ami](https://github.com/awslabs/amazon-eks-ami) to see how this is done for AL2. @@ -768,6 +782,94 @@ spec: ``` {{% /alert %}} +### AL2023 + +* Your UserData may be in one of three formats: a [MIME multi part archive](https://cloudinit.readthedocs.io/en/latest/topics/format.html#mime-multi-part-archive), a NodeConfig YAML / JSON string, or a shell script. +* Karpenter will transform your custom UserData as a MIME part, if necessary, and then merge a generated MIME part to the **beginning** of the the generated MIME multi part archive. Since `nodeadm`, the bootstrap for the AL2023 EKS optimized AMI, merges NodeConfig objects from top to bottom any fields specified in the custom UserData will override Karpenter generated fields. Take caution when overriding these fields, misconfiguration can result in Nodes being unable to connect to your cluster. + +#### Passed-in UserData (NodeConfig) + +```yaml +apiVersion: node.eks.aws/v1alpha1 +kind: NodeConfig +spec: + kubelet: + config: + maxPods: 42 +``` + +#### Passed-in UserData (Bash) + +```shell +#!/bin/bash +echo "Hello, AL2023!" +``` + +#### Passed-in UserData (MIME) + +```shell +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="//" + +--// +Content-Type: application/node.eks.aws + +apiVersion: node.eks.aws/v1alpha1 +kind: NodeConfig +spec: + kubelet: + config: + maxPods: 42 +--// +Content-Type: text/x-shellscript; charset="us-ascii" + +#!/bin/bash +echo "Hello, AL2023!" +--// +``` + +#### Merged UserData + +```shell +MIME-Version: 1.0 +Content-Type: multipart/mixed; boundary="//" + +--// +Content-Type: application/node.eks.aws + +apiVersion: node.eks.aws/v1alpha1 +kind: NodeConfig +spec: + cluster: + apiServerEndpoint: https://test-cluster + certificateAuthority: cluster-ca + cidr: 10.100.0.0/16 + name: test-cluster + kubelet: + config: + clusterDNS: + - 10.100.0.10 + maxPods: 118 + flags: + - --node-labels="karpenter.sh/capacity-type=on-demand,karpenter.sh/nodepool=default" + +--// +Content-Type: application/node.eks.aws + +apiVersion: node.eks.aws/v1alpha1 +kind: NodeConfig +spec: + kubelet: + config: + maxPods: 42 +--// +Content-Type: text/x-shellscript; charset="us-ascii" + +#!/bin/bash +echo "Hello, AL2023!" +--//-- +``` + ### Bottlerocket * Your UserData must be valid TOML.