Skip to content

Latest commit

 

History

History
48 lines (31 loc) · 1.76 KB

04-20-demo-applications.md

File metadata and controls

48 lines (31 loc) · 1.76 KB

Demo Applications

Keda CPU Scaler Example

Context

This demo application shows how to scale the Kubernetes workloads using KEDA API based on a simple CPU consumption case.

See the KEDA documentation:

The KEDA demo application consists of:

  • order-service deployment (serving as a scale target)
  • busybox deployment (generating trafic)
  • scaled object using a simple CPU-based trigger

Procedure

  1. Deploy the demo application:
kubectl apply -f examples/keda-cpu-scaler-demo.yml
  1. Verify the successful deployment of the demo application:

You should see that scaled object is created and has a status READY:

kubectl get scaledobjects.keda.sh -n keda-demo
NAME                        SCALETARGETKIND      SCALETARGETNAME   MIN   MAX   TRIGGERS   AUTHENTICATION   READY   ACTIVE   FALLBACK   AGE
orders-service-cpu-scaler   apps/v1.Deployment   orders-service    1     10    cpu                         True    True     Unknown    8m3s

You should also see that after a while, KEDA has engaged the Kubernetes HorizontalPodAutoscaler, which controls the number of replicas of the target deployment.

kubectl get hpa -n keda-demo
NAMESPACE   NAME                                 REFERENCE                   TARGETS   MINPODS   MAXPODS   REPLICAS   AGE
keda-demo   keda-hpa-orders-service-cpu-scaler   Deployment/orders-service   80%/30%   1         10        4          31s

Keda Prometheus Scaler Example

To experience how Kyma's Keda module can complement other Kyma components, read Scale to Zero With Keda.