KEDA

Definition

KEDA (Kubernetes-based Event Driven Autoscaling) is an open-source project that enables Kubernetes to scale applications based on the number of events needing to be processed. It acts as a Kubernetes Metrics Server and allows users to define autoscaling policies based on custom metrics, such as the length of a message queue or the number of pending jobs. KEDA is particularly useful for event-driven architectures where workloads can vary significantly.

Secure Settings Example

apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: secure-scaledobject
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: my-secure-app
  minReplicaCount: 1
  maxReplicaCount: 10
  triggers:
  - type: azure-queue
    metadata:
      queueName: myqueue
      connectionFromEnv: QUEUE_CONNECTION_STRING
  authenticationRef:
    name: keda-auth-secret

Insecure Settings Example

apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
  name: insecure-scaledobject
spec:
  scaleTargetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: my-insecure-app
  minReplicaCount: 0
  maxReplicaCount: 100
  triggers:
  - type: azure-queue
    metadata:
      queueName: myqueue
      connection: "DefaultEndpointsProtocol=https;AccountName=myaccount;AccountKey=mykey;EndpointSuffix=core.windows.net"