For more information about KEDA: https://keda.sh/
- Working K8s cluster
- Microsoft Storage Emulator
- Local docker registry: https://www.quickdevnotes.com/hosting-first-private-docker-registry/
Use deployments/scaling-function/apply-keda.sh to install KEDA on your K8s cluster.
Go to the folder Scaling.Function and run: docker build -t scaling/queuetrigger-function .
I used a local docker registry, but you can also use your Docker Hub, but then you needs to change the image tag in: deployments/scaling-function/deployment.yaml
Go to the folder Scaling.Function and run:
docker build -t scaling:demo-v4 .
docker tag scaling:demo-v4 localhost:5000/scaling/demo-v4
docker push localhost:5000/scaling/demo-v4
Use deployments/scaling-function/deploy.sh to install the scaling-function on your K8s cluster.
kubectl get deploy -n demo
kubectl get pods -n demo
Go to the folder Scaling.QueueFillApp and run dotnet run 10 20
This command will add 10 messages to the queue with a duration of 20 seconds per message. The default duration is 5 seconds.
kubectl get pods -n demo
Use deployments/scaling-function/remove.sh to remove the scaling-function from your K8s cluster.
Use deployments/scaling-function/remove-keda.sh to remove KEDA from your K8s cluster.