karpenter

by Snowplow

Helm chartv0.1.0App 1.13.0Verified 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.

The chart is based on the upstream Karpenter chart: https://github.com/aws/karpenter-provider-aws/tree/main/charts/karpenter

Prerequisites

  • Kubernetes 1.25+
  • Helm 3.8+
  • Karpenter CRDs installed (see karpenter-crds chart in this repository)
  • An EKS cluster with the necessary IAM permissions for Karpenter

Installing the Chart

Add the repository to Helm:

helm repo add snowplow-devops https://snowplow-devops.github.io/helm-charts

Install the CRDs first:

helm upgrade --install karpenter-crds --namespace karpenter snowplow-devops/karpenter-crds --create-namespace

Install or upgrade the chart with default configuration:

helm upgrade --install karpenter --namespace karpenter snowplow-devops/karpenter \
  --set settings.clusterName=my-cluster

Uninstalling the Chart

To uninstall/delete the karpenter release:

helm delete karpenter --namespace karpenter

Configuration

KeyTypeDefaultDescription
nameOverridestring""Overrides the chart's name
fullnameOverridestring""Overrides the chart's computed fullname
global.cloudstring"aws"Cloud provider (always aws for Karpenter)
global.labelsobject{}Additional labels to add into metadata
additionalLabelsobject{}Additional labels to add into metadata
additionalAnnotationsobject{}Additional annotations to add into metadata
imagePullPolicystring"IfNotPresent"Image pull policy for Docker images
imagePullSecretslist[]Image pull secrets for Docker images
service.annotationsobject{}Additional annotations for the Service
serviceAccount.createbooltrueSpecifies if a ServiceAccount should be created
serviceAccount.namestring""The name of the ServiceAccount to use
serviceAccount.annotationsobject{}Additional annotations for the ServiceAccount
additionalClusterRoleRuleslist[]Specifies additional rules for the core ClusterRole
serviceMonitor.enabledboolfalseSpecifies whether a ServiceMonitor should be created
serviceMonitor.additionalLabelsobject{}Additional labels for the ServiceMonitor
serviceMonitor.relabelingslist[]Relabelings for the http-metrics endpoint
serviceMonitor.metricRelabelingslist[]Metric relabelings for the http-metrics endpoint
serviceMonitor.endpointConfigobject{}Configuration on http-metrics endpoint
serviceMonitor.sampleLimitintnullSpecifies the sampleLimit for prometheus scrapes
replicasint2Number of replicas
revisionHistoryLimitint10The number of old ReplicaSets to retain
strategyobject{"rollingUpdate":{"maxUnavailable":1}}Strategy for updating the pod
podLabelsobject{}Additional labels for the pod
podAnnotationsobject{}Additional annotations for the pod
podDisruptionBudget.namestring"karpenter"Name of the PodDisruptionBudget
podDisruptionBudget.maxUnavailableint1Max unavailable pods for the PodDisruptionBudget
podSecurityContextobject{"fsGroup":65532,"seccompProfile":{"type":"RuntimeDefault"}}SecurityContext for the pod
priorityClassNamestring"system-cluster-critical"PriorityClass name for the pod
terminationGracePeriodSecondsintnilOverride the default termination grace period
hostNetworkboolfalseBind the pod to the host network
schedulerNamestring"default-scheduler"Specify which Kubernetes scheduler should dispatch the pod
dnsPolicystring"ClusterFirst"Configure the DNS Policy for the pod
dnsConfigobject{}Configure DNS Config for the pod
initContainerslist[]Additional initContainers to run before karpenter container starts
nodeSelectorobject{"kubernetes.io/os":"linux"}Node selectors to schedule the pod
affinityobjectSee values.yamlAffinity rules for scheduling the pod
topologySpreadConstraintslistSee values.yamlTopology spread constraints
tolerationslist[{"key":"CriticalAddonsOnly","operator":"Exists"}]Tolerations to allow the pod to be scheduled
extraVolumeslist[]Additional volumes for the pod
controller.containerNamestring"controller"Distinguishing container name
controller.image.repositorystring"public.ecr.aws/karpenter/controller"Repository path to the controller image
controller.image.tagstring""Tag of the controller image (defaults to appVersion)
controller.image.digeststring""SHA256 digest of the controller image
controller.envlist[]Additional environment variables for the controller pod
controller.envFromlist[]envFrom configuration for the controller pod
controller.securityContext.appArmorProfileobject{}AppArmor profile for the controller container
controller.securityContext.seLinuxOptionsobject{}SELinux options for the controller container
controller.securityContext.seccompProfileobject{}Seccomp profile for the controller container
controller.resourcesobject{}Resources for the controller container
controller.extraVolumeMountslist[]Additional volumeMounts for the controller container
controller.sidecarContainerlist[]Additional sidecar containers
controller.sidecarVolumeMountslist[]Additional volumeMounts for the sidecar
controller.metrics.portint8080The container port to use for metrics
controller.healthProbe.portint8081The container port to use for http health probe
logLevelstring"info"Global log level
logOutputPathslist["stdout"]Log outputPaths
logErrorOutputPathslist["stderr"]Log errorOutputPaths
settings.batchMaxDurationstring"10s"The maximum length of a batch window
settings.batchIdleDurationstring"1s"The maximum amount of time with no new ending pods
settings.preferencePolicystring"Respect"How the Karpenter scheduler should treat preferences
settings.minValuesPolicystring"Strict"How the Karpenter scheduler treats min values
settings.clusterCABundlestring""Cluster CA bundle for TLS configuration
settings.clusterNamestring""Cluster name (required)
settings.clusterEndpointstring""Cluster endpoint
settings.isolatedVPCboolfalseAssume we can't reach AWS services without VPC endpoint
settings.eksControlPlaneboolfalseDiscover cluster details from DescribeCluster API
settings.vmMemoryOverheadPercentfloat0.075VM memory overhead as a percent
settings.interruptionQueuestring""SQS queue name for interruption events
settings.enableZonalShiftboolfalseRespect zonal shifts when making node claims
settings.reservedENIsstring"0"Reserved ENIs not included in max-pods calculations
settings.ignoreDRARequestsbooltrueIgnore pods' DRA requests during scheduling
settings.disableClusterStateObservabilityboolfalseDisable cluster state metrics and events
settings.disableDryRunboolfalseDisable dry run validation for EC2NodeClasses
settings.amiRefreshIntervalstring"1m"How often Karpenter refreshes AMI data
settings.subnetRefreshIntervalstring"1m"How often Karpenter refreshes subnet data
settings.featureGates.nodeRepairboolfalseEnable node repair (ALPHA)
settings.featureGates.nodeOverlayboolfalseEnable node overlay (ALPHA)
settings.featureGates.reservedCapacitybooltrueEnable reserved capacity (BETA)
settings.featureGates.spotToSpotConsolidationboolfalseEnable spot-to-spot consolidation (ALPHA)
settings.featureGates.staticCapacityboolfalseEnable static capacity (ALPHA)
settings.featureGates.capacityBufferboolfalseEnable capacity buffer (ALPHA)

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.1.0 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