Skip to content

sabbour/nap-spot-scaling

Repository files navigation

Azure Kubernetes Service (AKS) scaling demo using AKS Automatic + Spot instances

Components

  1. AKS Automatic cluster
  2. Node Auto Provisioning (NAP) with a spot NodePool

Setup

  1. Clone the repository locally.
  2. Login using az login.
  3. Make sure kubectl is installed. You can install using az aks install-cli.
  4. Make sure hey is installed if you want to use it for the load test.
  5. Run ./setup.sh in a Bash shell, preferably in Windows Subsystem for Linux (WSL).

Exposed endpoints

  1. /workout: generates long strings and stores them in memory.
  2. /metrics: Prometheus metrics.
  3. /stats: .NET stats.

Test

  1. After deployment observe the node claims being created
    kubectl get nodeclaims -o wide -w
  2. Verify that the deployment is available and running
    kubectl get deployment serverloader -n test -w
  3. When the deployment is running, run a load test against the /workout endpoint. You can use Azure Load Testing or hey.
    hey -n 240000 -c 300 http://${SERVICE_IP}/workout"
  4. Observe Node Auto Provisioning adding more nodes to the cluster.
    kubectl get events -n test --field-selector source=karpenter -w

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages