karpenter

by IOMETE Inc.

Helm chartv0.19.3App 0.19.3Verified publisher

A Helm chart for Karpenter, an open-source node provisioning project built for Kubernetes.

About this chart

karpenter

A Helm chart for Karpenter, an open-source node provisioning project built for Kubernetes.

Documentation

For full Karpenter documentation please checkout https://karpenter.sh.

Installing the Chart

You can follow the detailed installation instruction in the documentation which covers the Karpenter prerequisites and installation options. The outcome of these instructions should result in something like the following command.

helm upgrade --install --namespace karpenter --create-namespace \
  karpenter oci://public.ecr.aws/karpenter/karpenter \
  --version v0.19.3 \
  --set serviceAccount.annotations.eks\.amazonaws\.com/role-arn=${KARPENTER_IAM_ROLE_ARN} \
  --set settings.aws.clusterName=${CLUSTER_NAME} \
  --set settings.aws.clusterEndpoint=${CLUSTER_ENDPOINT} \
  --set settings.aws.defaultInstanceProfile=KarpenterNodeInstanceProfile-${CLUSTER_NAME} \
  --set settings.aws.interruptionQueueName=${CLUSTER_NAME} \
  --wait

Values

KeyTypeDefaultDescription
additionalAnnotationsobject{}Additional annotations to add into metadata.
additionalLabelsobject{}Additional labels to add into metadata.
affinityobject{"nodeAffinity":{"requiredDuringSchedulingIgnoredDuringExecution":{"nodeSelectorTerms":[{"matchExpressions":[{"key":"karpenter.sh/provisioner-name","operator":"DoesNotExist"}]}]}}}Affinity rules for scheduling the pod.
controller.envlist[]Additional environment variables for the controller pod.
controller.extraVolumeMountslist[]Additional volumeMounts for the controller pod.
controller.imagestring"public.ecr.aws/karpenter/controller:v0.19.3@sha256:f0e5ab60b2dfecfb862b8bb10089a9bd1ee022acd9ec1e7cfe867c94d2b51023"Controller image.
controller.logEncodingstring""Controller log encoding, defaults to the global log encoding
controller.logLevelstring""Controller log level, defaults to the global log level
controller.resourcesobject{"limits":{"cpu":1,"memory":"1Gi"},"requests":{"cpu":1,"memory":"1Gi"}}Resources for the controller pod.
controller.securityContextobject{}SecurityContext for the controller container.
dnsConfigobject{}Configure DNS Config for the pod
dnsPolicystring"Default"Configure the DNS Policy for the pod
extraVolumeslist[]Additional volumes for the pod.
fullnameOverridestring""Overrides the chart's computed fullname.
hostNetworkboolfalseBind the pod to the host network. This is required when using a custom CNI.
imagePullPolicystring"IfNotPresent"Image pull policy for Docker images.
imagePullSecretslist[]Image pull secrets for Docker images.
logEncodingstring"console"Gloabl log encoding
logLevelstring"debug"Global log level
nameOverridestring""Overrides the chart's name.
nodeSelectorobject{"kubernetes.io/os":"linux"}Node selectors to schedule the pod to nodes with labels.
podAnnotationsobject{}Additional annotations for the pod.
podDisruptionBudget.maxUnavailableint1
podDisruptionBudget.namestring"karpenter"
podLabelsobject{}Additional labels for the pod.
podSecurityContextobject{"fsGroup":1000}SecurityContext for the pod.
priorityClassNamestring"system-cluster-critical"PriorityClass name for the pod.
replicasint2Number of replicas.
revisionHistoryLimitint10The number of old ReplicaSets to retain to allow rollback.
serviceAccount.annotationsobject{}Additional annotations for the ServiceAccount.
serviceAccount.createbooltrueSpecifies if a ServiceAccount should be created.
serviceAccount.namestring""The name of the ServiceAccount to use. If not set and create is true, a name is generated using the fullname template.
serviceMonitor.additionalLabelsobject{}Additional labels for the ServiceMonitor.
serviceMonitor.enabledboolfalseSpecifies whether a ServiceMonitor should be created.
serviceMonitor.endpointConfigobject{}Endpoint configuration for the ServiceMonitor.
settingsobject{"aws":{"clusterEndpoint":"","clusterName":"","defaultInstanceProfile":"","enableENILimitedPodDensity":true,"enablePodENI":false,"interruptionQueueName":"","isolatedVPC":false,"nodeNameConvention":"ip-name","tags":null,"vmMemoryOverheadPercent":0.075},"batchIdleDuration":"1s","batchMaxDuration":"10s"}Global Settings to configure Karpenter
settings.awsobject{"clusterEndpoint":"","clusterName":"","defaultInstanceProfile":"","enableENILimitedPodDensity":true,"enablePodENI":false,"interruptionQueueName":"","isolatedVPC":false,"nodeNameConvention":"ip-name","tags":null,"vmMemoryOverheadPercent":0.075}AWS-specific configuration values
settings.aws.clusterEndpointstring""Cluster endpoint.
settings.aws.clusterNamestring""Cluster name.
settings.aws.defaultInstanceProfilestring""The default instance profile to use when launching nodes
settings.aws.enableENILimitedPodDensitybooltrueIndicates whether new nodes should use ENI-based pod density DEPRECATED: Use .spec.kubeletConfiguration.maxPods to set pod density on a per-provisioner basis
settings.aws.enablePodENIboolfalseIf true then instances that support pod ENI will report a vpc.amazonaws.com/pod-eni resource
settings.aws.interruptionQueueNamestring""interruptionQueueName is currently in ALPHA and is disabled by default. Enabling interruption handling may require additional permissions on the controller service account. Additional permissions are outlined in the docs.
settings.aws.isolatedVPCboolfalseIf true then assume we can't reach AWS services which don't have a VPC endpoint This also has the effect of disabling look-ups to the AWS pricing endpoint
settings.aws.nodeNameConventionstring"ip-name"The node naming convention (either "ip-name" or "resource-name")
settings.aws.tagsstringnilThe global tags to use on all AWS infrastructure resources (launch templates, instances, SQS queue, etc.)
settings.aws.vmMemoryOverheadPercentfloat0.075The VM memory overhead as a percent that will be subtracted from the total memory for all instance types
settings.batchIdleDurationstring"1s"The maximum amount of time with no new ending pods that if exceeded ends the current batching window. If pods arrive faster than this time, the batching window will be extended up to the maxDuration. If they arrive slower, the pods will be batched separately.
settings.batchMaxDurationstring"10s"The maximum length of a batch window. The longer this is, the more pods we can consider for provisioning at one time which usually results in fewer but larger nodes.
strategyobject{"rollingUpdate":{"maxUnavailable":1}}Strategy for updating the pod.
terminationGracePeriodSecondsstringnilOverride the default termination grace period for the pod.
tolerationslist[{"key":"CriticalAddonsOnly","operator":"Exists"}]Tolerations to allow the pod to be scheduled to nodes with taints.
topologySpreadConstraintslist[{"maxSkew":1,"topologyKey":"topology.kubernetes.io/zone","whenUnsatisfiable":"ScheduleAnyway"}]topologySpreadConstraints to increase the controller resilience
webhook.logLevelstring"error"
webhook.portint8443The container port to use for the webhook.

Deploy karpenter with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has karpenter on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartkarpenter is pinned at v0.19.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply