Skip to content

Latest commit

 

History

History
56 lines (39 loc) · 1.22 KB

README.md

File metadata and controls

56 lines (39 loc) · 1.22 KB

Scaling apps to zero with Kubernetes and KEDA

This project helps you create a cluster that scales apps to zero with KEDA and the HTTP scaler.

Scaling Kubernetes deployment to zero

Getting started

You need to create a Linode token to access the API:

linode-cli profile token-create
export LINODE_TOKEN=<insert the token here>
# Create the cluster
terraform -chdir=01-clusters init
terraform -chdir=01-clusters apply -auto-approve

# Install KEDA & Nginx
terraform -chdir=02-keda init
terraform -chdir=02-keda apply -auto-approve

# Tidy up: remove all Kubernetes resources first
kubectl delete -f 03-demo

# Tidy up
terraform -chdir=02-keda destroy -auto-approve
terraform -chdir=01-clusters destroy -auto-approve

Demo

Make sure that your kubectl is configured with the current kubeconfig file:

export KUBECONFIG="${PWD}/kubeconfig"

The execute:

kubectl apply -f 03-demo/01-podinfo.yaml
kubectl apply -f 03-demo/02-ingress.yaml
kubectl apply -f 03-demo/03-scaled-object.yaml
kubectl apply -f 03-demo/04-locust.yaml

Dashboard

Open the dashboard and enter the IP address of the Ingress load balancer.

kubectl proxy --www=./dashboard