--- apiVersion: karpenter.sh/v1alpha5 kind: Provisioner metadata: name: default spec: # References cloud provider-specific custom resource, see your cloud provider specific documentation providerRef: name: default # ttlSecondsAfterEmpty: 30 taints: - key: applications effect: NoSchedule # Labels are arbitrary key-values that are applied to all nodes labels: node-type: applications # Requirements that constrain the parameters of provisioned nodes. # These requirements are combined with pod.spec.affinity.nodeAffinity rules. # Operators { In, NotIn } are supported to enable including or excluding values requirements: - key: "karpenter.k8s.aws/instance-category" operator: In values: ["c", "m"] - key: "karpenter.k8s.aws/instance-cpu" operator: In values: ["4", "8", "16", "32"] - key: "kubernetes.io/arch" operator: In values: ["amd64"] - key: "karpenter.sh/capacity-type" # If not included, the webhook for the AWS cloud provider will default to on-demand operator: In values: ["on-demand"] limits: resources: cpu: 20 # CPU Cores across all instances memory: 2000Gi # Enables consolidation which attempts to reduce cluster cost by both removing un-needed nodes and down-sizing those # that can't be removed. Mutually exclusive with the ttlSecondsAfterEmpty parameter. consolidation: enabled: true --- apiVersion: karpenter.k8s.aws/v1alpha1 kind: AWSNodeTemplate metadata: name: default spec: subnetSelector: karpenter.sh/discovery: eks-upgrades-workshop # Define the better tag for your subnet securityGroupSelector: karpenter.sh/discovery: eks-upgrades-workshop # Define the better tag for your subnet tags: managed-by: "karpenter" intent: "apps" Name: "karpenter-node"