Helm chartv2.21.1App 2.21.0

Event-based autoscaler for workloads on Kubernetes

About this chart

KEDA allows for fine grained autoscaling (including to/from zero) for event driven Kubernetes workloads. KEDA serves as a Kubernetes Metrics Server and allows users to define autoscaling rules using a dedicated Kubernetes custom resource definition.

KEDA can run on both the cloud and the edge, integrates natively with Kubernetes components such as the Horizontal Pod Autoscaler, and has no external dependencies.



TL;DR

helm repo add kedacore https://kedacore.github.io/charts
helm repo update

kubectl create namespace keda
helm install keda kedacore/keda --namespace keda --version 2.21.0

Introduction

This chart bootstraps KEDA infrastructure on a Kubernetes cluster using the Helm package manager.

As part of that, it will install all the required Custom Resource Definitions (CRD).

Installing the Chart

To install the chart with the release name keda:

$ kubectl create namespace keda
$ helm install keda kedacore/keda --namespace keda --version 2.21.0

Uninstalling the Chart

To uninstall/delete the keda Helm chart:

helm uninstall keda

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the KEDA chart and their default values.

General parameters

ParameterTypeDefaultDescription
additionalAnnotationsobject{}Custom annotations to add into metadata
additionalLabelsobject{}Custom labels to add into metadata
affinityobject{}[Affinity] for pod scheduling for KEDA operator, Metrics API Server and KEDA admission webhooks.
asciiArtbooltrueCapability to turn on/off ASCII art in Helm installation notes
certificates.autoGeneratedbooltrueEnables the self generation for KEDA TLS certificates inside KEDA operator
certificates.certManager.caSecretNamestring"kedaorg-ca"Secret name where the CA is stored (generatedby cert-manager or user given)
certificates.certManager.durationstring"8760h0m0s"Certificate duration
certificates.certManager.enabledboolfalseEnables Cert-manager for certificate management
certificates.certManager.generateCAbooltrueGenerates a self-signed CA with Cert-manager. If generateCA is false, the secret with the CA has to be annotated with cert-manager.io/allow-direct-injection: "true"
certificates.certManager.issuerobject{"generate":true,"group":"cert-manager.io","kind":"ClusterIssuer","name":"foo-org-ca"}Reference to custom Issuer. If issuer.generate is false, then issuer.group, issuer.kind and issuer.name are required
certificates.certManager.issuer.generatebooltrueGenerates an Issuer resource with Cert-manager
certificates.certManager.issuer.groupstring"cert-manager.io"Custom Issuer group. Required when generate: false
certificates.certManager.issuer.kindstring"ClusterIssuer"Custom Issuer kind. Required when generate: false
certificates.certManager.issuer.namestring"foo-org-ca"Custom Issuer name. Required when generate: false
certificates.certManager.renewBeforestring"5840h0m0s"Certificate renewal time before expiration
certificates.certManager.secretTemplateobject{}Add labels/annotations to secrets created by Certificate resources docs
certificates.mountPathstring"/certs"Path where KEDA TLS certificates are mounted
certificates.operator.apiServicePatching.enabledboolnilWhen explicitly set, controls whether the operator injects the self-generated TLS CA into the APIService for the KEDA Metrics API Server via the --enable-apiservice-patching flag. When unset (default), the flag is not passed and the operator uses its built-in default. Only effective when certificates.autoGenerated=true and certificates.certManager.enabled=false. If set to false while metricsServer.enabled=true, you must provide an alternative CA injection mechanism or the metrics API will fail TLS verification.
certificates.secretNamestring"kedaorg-certs"Secret name to be mounted with KEDA TLS certificates
clusterDomainstring"cluster.local"Kubernetes cluster domain
clusterNamestring"kubernetes-default"Kubernetes cluster name. Used in features such as emitting CloudEvents
crds.additionalAnnotationsobject{}Custom annotations specifically for CRDs
crds.installbooltrueDefines whether the KEDA CRDs have to be installed or not.
customManagedBystring""When specified, each rendered resource will have app.kubernetes.io/managed-by: ${this} label on it. Useful, when using only helm template with some other solution.
enableServiceLinksbooltrueEnable service links in pods. Although enabled, mirroring k8s default, it is highly recommended to disable, due to its legacy status Legacy container links
envlist[]Additional environment variables that will be passed onto all KEDA components
extraObjectslist[]Array of extra K8s manifests to deploy
global.dnsConfigobject{}DNS config for KEDA components
global.image.registrystringnilGlobal image registry of KEDA components
grpcTLSCertsSecretstring""Set this if you are using an external scaler and want to communicate over TLS (recommended). This variable holds the name of the secret that will be mounted to the /grpccerts path on the Pod
hashiCorpVaultTLSstring""Set this if you are using HashiCorp Vault and want to communicate over TLS (recommended). This variable holds the name of the secret that will be mounted to the /vault path on the Pod
hostAliaseslist[]HostAliases for pod networking (docs)
http.idleConnTimeoutstring"90s"Maximum time an idle HTTP connection remains in the pool. Must be greater than zero.
http.keepAlive.enabledbooltrueEnable HTTP connection keep alive
http.maxIdleConnsint0Maximum number of idle HTTP connections across all hosts. Zero means no limit.
http.maxIdleConnsPerHostint1000Maximum number of idle HTTP connections to keep per host
http.minTlsVersionstring"TLS12"The minimum TLS version to use for all scalers that use raw HTTP clients (some scalers use SDKs to access target services. These have built-in HTTP clients, and this value does not necessarily apply to them)
http.timeoutint3000The default HTTP timeout to use for all scalers that use raw HTTP clients (some scalers use SDKs to access target services. These have built-in HTTP clients, and the timeout does not necessarily apply to them)
http.tlsCipherListstring""The list of cipher suites to use when making HTTP over TLS connections. When left empty or unset, the TLS implementation will provide a default list of cipher suites which are believed to be secure.
image.pullPolicystring"Always"Image pullPolicy for all KEDA components
imagePullSecretslist[]Name of secret to use to pull images to use to pull Docker images
networkPolicy.ciliumobject{"operator":{"extraEgressRules":[]}}Allow use of extra egress rules for cilium network policies
networkPolicy.enabledboolfalseEnable network policies
networkPolicy.flavorstring"cilium"Flavor of the network policies (cilium, kubernetes)
networkPolicy.kubernetesobject{"metricsServer":{"extraEgressRules":[]},"operator":{"extraEgressRules":[]},"webhooks":{"extraEgressRules":[]}}Allow use of extra egress rules for kubernetes network policies
nodeSelectorobject{}Node selector for pod scheduling (docs)
podIdentity.aws.irsa.audiencestring"sts.amazonaws.com"Sets the token audience for IRSA. This will be set as an annotation on the KEDA service account.
podIdentity.aws.irsa.enabledboolfalseSpecifies whether AWS IAM Roles for Service Accounts (IRSA) is to be enabled or not.
podIdentity.aws.irsa.roleArnstring""Set to the value of the ARN of an IAM role with a web identity provider. This will be set as an annotation on the KEDA service account.
podIdentity.aws.irsa.stsRegionalEndpointsstring"true"Sets the use of an STS regional endpoint instead of global. Recommended to use regional endpoint in almost all cases. This will be set as an annotation on the KEDA service account.
podIdentity.aws.irsa.tokenExpirationint86400Set to the value of the service account token expiration duration. This will be set as an annotation on the KEDA service account.
podIdentity.azureWorkload.clientIdstring""Id of Azure Active Directory Client to use for authentication with Azure Workload Identity. (docs)
podIdentity.azureWorkload.enabledboolfalseSet to true to enable Azure Workload Identity usage. See https://keda.sh/docs/concepts/authentication/#azure-workload-identity This will be set as a label on the KEDA service account.
podIdentity.azureWorkload.tenantIdstring""Id Azure Active Directory Tenant to use for authentication with for Azure Workload Identity. (docs)
podIdentity.azureWorkload.tokenExpirationint3600Duration in seconds to automatically expire tokens for the service account. (docs)
podIdentity.gcp.enabledboolfalseSet to true to enable GCP Workload Identity. See https://keda.sh/docs/2.10/authentication-providers/gcp-workload-identity/ This will be set as a annotation on the KEDA service account.
podIdentity.gcp.gcpIAMServiceAccountstring""GCP IAM Service Account Email which you would like to use for workload identity.
podSecurityContextobjectSee below[Pod security context] for all pods
priorityClassNamestring""priorityClassName for all KEDA components
rbac.aggregateToDefaultRolesboolfalseSpecifies whether RBAC for CRDs should be aggregated to default roles (view, edit, admin)
rbac.controlPlaneServiceAccountsNamespacestring"kube-system"Customize the namespace of k8s metrics-server deployment This could also be achieved by the Kubernetes control plane manager flag --use-service-account-credentials: docs
rbac.createbooltrueSpecifies whether RBAC should be used
rbac.enabledCustomScaledRefKindsbooltrueWhether RBAC for configured CRDs that can have a scale subresource should be created
rbac.scaledRefKindslist[{"apiGroup":"*","kind":"*"}]List of custom resources that support the scale subresource and can be referenced by scaledobject.spec.scaleTargetRef. The feature needs to be also enabled by enabledCustomScaledRefKinds. If left empty, RBAC for apiGroups: * and resources: *, */scale will be created note: Deployments and StatefulSets are supported out of the box
securityContextobjectSee below[Security context] for all containers
tolerationslist[]Tolerations for pod scheduling (docs)
watchLabelSelectorstring""Restricts the operator to reconcile only ScaledObjects and ScaledJobs (and their derived HorizontalPodAutoscalers) matching the given Kubernetes label selector. Default (empty) means no label-based filtering. Mirrors watchNamespace, but filters by label instead of by namespace. Examples: "environment=production", "tier in (gold,silver)", "!canary"
watchLabelSelectorForTriggerauthstring""Restricts the operator to reconcile only TriggerAuthentications and ClusterTriggerAuthentications matching the given Kubernetes label selector. Default (empty) means no label-based filtering. Decoupled from watchLabelSelector so a single cluster-scoped ClusterTriggerAuthentication can be shared across operators scoped to different label selectors.
watchNamespacestring""Defines Kubernetes namespaces to watch to scale their workloads. Default watches all namespaces

Operator

KEDA 2.21+ requires approved token audiences for Vault Kubernetes authentication and boundServiceAccountToken. To restore the old, insecure behavior, set operator.serviceAccountTokens.mode: legacy and clear all audience settings, including hashiCorpVault.kubernetesAuth.audience. Vault endpoint filtering is optio

Deploy keda with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has keda 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 chartkeda is pinned at v2.21.1 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