Commit a9009d87 authored by Mohamad Bashar Desoki's avatar Mohamad Bashar Desoki

ADD KEDA and test it (general case)

parent 08d8655c
## Deploy KEDA via Helm
Install [Helm3](https://helm.sh/docs/intro/install/) on your local environment
Install KEDA component in the KEDA namespace on kubernetes cluster
```
# https://keda.sh/docs/2.6/deploy/#helm
kubectl create ns keda
helm repo add kedacore https://kedacore.github.io/charts
helm repo update
helm upgrade --install keda kedacore/keda -n keda
```
![https://blog.cloudacode.com/how-to-autoscale-kubernetes-pods-based-on-ingress-request-prometheus-keda-and-k6-84ae4250a9f3](img.png)
apiVersion: keda.sh/v1alpha1
kind: ScaledObject
metadata:
name: v1-ingress-requests
spec:
scaleTargetRef:
kind: Deployment # Optional. Default: Deployment
name: ms-demo # Mandatory. Must be in the same namespace as the ScaledObject
pollingInterval: 5 # Optional. Default: 30 seconds
cooldownPeriod: 15 # Optional. Default: 300 seconds
minReplicaCount: 1 # Optional. Default: 0
maxReplicaCount: 5 # Optional. Default: 100
triggers:
- type: prometheus
metadata:
serverAddress: http://prometheus-service.monitoring.svc:9090
metricName: nginx_ingress_controller_nginx_process_requests_total
threshold: '5'
query: sum(rate(nginx_ingress_controller_requests{path="/fib"}[2m]))
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment