# This example provisioner will provision instances using a custom EKS-Optimized AMI that belongs to the # AL2 AMIFamily. If your AMIs are built off https://github.com/awslabs/amazon-eks-ami and can be bootstrapped # by Karpenter, this may be a good fit for you. apiVersion: karpenter.sh/v1alpha5 kind: Provisioner metadata: name: default spec: limits: resources: cpu: 20 providerRef: name: al2 consolidation: enabled: true --- apiVersion: karpenter.k8s.aws/v1alpha1 kind: AWSNodeTemplate metadata: name: al2 spec: amiFamily: AL2 instanceProfile: myInstanceProfile subnetSelector: karpenter.sh/discovery: my-cluster securityGroupSelector: karpenter.sh/discovery: my-cluster amiSelector: aws-ids: ami-123,ami456 userData: | MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="BOUNDARY" --BOUNDARY Content-Type: text/x-shellscript; charset="us-ascii" #!/bin/bash echo "Running a custom user data script" --BOUNDARY--