keda

by Helm

Helm chartv2.17.0App 2.17.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.17.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.17.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.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.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
http.keepAlive.enabledbooltrueEnable HTTP connection keep alive
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)
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)
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)
watchNamespacestring""Defines Kubernetes namespaces to watch to scale their workloads. Default watches all namespaces

Operator

ParameterTypeDefaultDescription
certificates.operatorstringnil
extraArgs.kedaobject{}Additional KEDA Operator container arguments
image.keda.registrystring"ghcr.io"Image registry of KEDA operator
image.keda.repositorystring"kedacore/keda"Image name of KEDA operator
image.keda.tagstring""Image tag of KEDA operator. Optional, given app version of Helm chart is used by default
logging.operator.formatstring"console"Logging format for KEDA Operator. allowed values: json or console
logging.operator.levelstring"info"Logging level for KEDA Operator. allowed values: debug, info, error, or an integer value greater than 0, specified as string
logging.operator.stackTracesEnabledboolfalseIf enabled, the stack traces will be also printed
logging.operator.timeEncodingstring"rfc3339"Logging time encoding for KEDA Operator. allowed values are epoch, millis, nano, iso8601, rfc3339 or rfc3339nano
operator.affinityobject{}[Affinity] for pod scheduling for KEDA operator. Takes precedence over the affinity field
operator.disableCompressionbooltrueDisable response compression for k8s restAPI in client-go. Disabling compression simply means that turns off the process of making data smaller for K8s restAPI in client-go for faster transmission.
operator.extraContainerslist[]Additional containers to run as part of the operator deployment
operator.extraInitContainerslist[]Additional init containers to run as part of the operator deployment
operator.livenessProbeobject{"failureThreshold":3,"initialDelaySeconds":25,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":1}Liveness probes for operator (docs)
operator.namestring"keda-operator"Name of the KEDA operator
operator.readinessProbeobject{"failureThreshold":3,"initialDelaySeconds":20,"periodSeconds":3,"successThreshold":1,"timeoutSeconds":1}Readiness probes for operator (docs)
operator.replicaCountint1Capability to configure the number of replicas for KEDA operator. While you can run more replicas of our operator, only one operator instance will be the leader and serving traffic. You can run multiple replicas, but they will not improve the performance of KEDA, it could only reduce downtime during a failover. Learn more in [our documen

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