GKE Autoscaling Benchmarking

Purpose

Runs a series of benchmarks against a workload with HPA enabled within a GKE cluster.

Prereqs

Instructions

  1. Manually create a project with a valid billing account. (These scripts will not do this for you).

  2. Create the cluster via:

    cd stage02-cluster
    cp sample-terraform.tfvars terraform.tfvars
    vim terraform.tfvars  # edit the values appropriately
    terraform init
    terraform apply
    cd ..
  3. Create the workload via:

    cd stage03-workload
    terraform init
    terraform apply
    cd ..

    This will create a deployment that will calculate numbers in the fibonacci sequence. Feel free to replace this with your own workload.

  4. Create the benchmarking tooling (which will run on the same cluster):

    cd stage04-benchmarking
    terraform init
    terraform apply
    cd ..
  5. Start the benchmarking via the locust web UI

    # Get the external IP Addr
    gcloud container clusters get-credentials benchmarking --location=us-central1-c
    kubectl get svc/locust -n fib -o json | jq '.status.loadBalancer.ingress[0].ip'
    
    # Now visit the ip addr at port 8089 in your web browser

    Run the test with 50 users to start.