{"id":26642813,"url":"https://github.com/whiteducksoftware/aks-scaling-examples","last_synced_at":"2026-07-16T06:31:05.822Z","repository":{"id":211071465,"uuid":"727293704","full_name":"whiteducksoftware/aks-scaling-examples","owner":"whiteducksoftware","description":"This repo contains examples for using different scaling options with AKS","archived":false,"fork":false,"pushed_at":"2023-12-06T13:53:53.000Z","size":1835,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-26T15:56:45.514Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/whiteducksoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-04T15:19:58.000Z","updated_at":"2023-12-04T16:14:25.000Z","dependencies_parsed_at":"2023-12-06T11:07:03.375Z","dependency_job_id":"7608fc67-5580-4e0e-b65a-c5cf11731eb4","html_url":"https://github.com/whiteducksoftware/aks-scaling-examples","commit_stats":null,"previous_names":["whiteducksoftware/aks-scaling-examples"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/whiteducksoftware/aks-scaling-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteducksoftware%2Faks-scaling-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteducksoftware%2Faks-scaling-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteducksoftware%2Faks-scaling-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteducksoftware%2Faks-scaling-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/whiteducksoftware","download_url":"https://codeload.github.com/whiteducksoftware/aks-scaling-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/whiteducksoftware%2Faks-scaling-examples/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35534108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-16T02:00:06.687Z","response_time":83,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-24T19:28:04.601Z","updated_at":"2026-07-16T06:31:05.800Z","avatar_url":"https://github.com/whiteducksoftware.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AKS scaling examples\n\n## Create AKS cluster\n\n```bash\n# Create 1 AKS clusters with VPA, KEDA and cluster-autoscaler enabled\ncd ./src\n\n# Login to Azure\naz login\naz account set --subscription \u003cSUBSCRIPTION_ID\u003e\n\n# Execute Terraform\nterraform init\nterraform apply -auto-approve\n```\n\n### Enable VPA\n\n```terraform\nresource \"azurerm_kubernetes_cluster\" \"aks\" {\n  workload_autoscaler_profile {\n    vertical_pod_autoscaler_enabled = true\n  }\n}\n```\n\n### Enable KEDA\n\n```terraform\nresource \"azurerm_kubernetes_cluster\" \"aks\" {\n  workload_autoscaler_profile {\n    keda_enabled                    = true\n  }\n}\n```\n\n## Enable cluster-autoscaler\n\n```terraform\n# Set the global auto-scaler config\nresource \"azurerm_kubernetes_cluster\" \"aks\" {\n\n  auto_scaler_profile {\n  }\n}\n\n# Enable auto-scaler per node pool\nresource \"azurerm_kubernetes_cluster_node_pool\" \"scale\" {\n  enable_auto_scaling   = true\n}\n```\n\n## Horizontal Pod Autoscaler\n\nThis demo uses the VPA (needs to be activated on AKS) and metrics-server shipped with AKS\n\n```bash\nkubectl create ns hpa\n\n# Create HPA and deployment resources vor v1 API\nkubectl -n hpa apply -f ./k8s/hpav1.yaml\nkubectl -n hpa get hpa hpa-demo-deployment-v1\nkubectl -n hpa events\nkubectl -n hpa get rs,pod\nkubectl -n hpa get hpa hpa-demo-deployment-v1\nkubectl -n hpa describe hpa hpa-demo-deployment-v1\n\n# Create some load\nwatch -n 1 kubectl -n hpa get hpa,rs,pod\nkubectl -n hpa run -i --tty load-generator-v1 --rm --image=busybox --restart=Never \\\n  -- /bin/sh -c \"while sleep 0.01; do wget -q -O- http://hpa-demo-deployment-v1; done\"\nkubectl -n hpa describe hpa hpa-demo-deployment-v1\n\n# Create HPA and deployment resources vor v2 API\nkubectl -n hpa apply -f ./k8s/hpav2.yaml\nkubectl -n hpa get hpa hpa-demo-deployment-v2\nkubectl -n hpa events\nkubectl -n hpa get rs,pod\nkubectl -n hpa get hpa hpa-demo-deployment-v2\nkubectl -n hpa describe hpa hpa-demo-deployment-v2\nkubectl -n hpa get rs,pod\n\n# Create some load\nwatch -n 1 kubectl -n hpa get hpa,rs,pod\nkubectl -n hpa run -i --tty load-generator-v2 --rm --image=busybox --restart=Never \\\n  -- /bin/sh -c \"while sleep 0.01; do wget -q -O- http://hpa-demo-deployment-v2; done\"\nkubectl -n hpa describe hpa hpa-demo-deployment-v2\n```\n\n## Vertical Pod Autoscaler\n\nThis demo uses the VPA (needs to be activated on AKS)\n\n```bash\nkubectl create ns vpa\n\n# Create VPA and deployment resources with too low resources with update mode \"auto\"\nkubectl -n vpa apply -f ./k8s/vpa-low.yaml\nkubectl -n vpa describe pod hamster-low-\nkubectl -n vpa describe vpa/hamster-vpa-low\nkubectl -n vpa events\n\n# Create VPA and deployment resources with too high resources but with update mode \"Off\"\nkubectl -n vpa apply -f ./k8s/vpa-high.yaml\nkubectl -n vpa get pods\nkubectl -n vpa describe pod hamster-high-\nkubectl -n vpa get vpa\nkubectl -n vpa describe vpa/hamster-vpa-high\n```\n\n## KEDA\n\nThis demo uses the KEDA (needs to be activated on AKS). Keda leverages Worload Identity to check if messages Azure Service Bus queue.\n\n```bash\nkubectl create ns keda\n\n# Set the base64 encrypted \"servicebus-connectionstring\" for the ServiceBus in the file ./k8s/keda.yaml\nkubectl -n keda apply -f ./k8s/keda.yaml\nkubectl -n keda get triggerauthentications.keda.sh trigger-auth-service-bus-orders\nkubectl -n keda get pods\nkubectl -n keda describe scaledobjects.keda.sh order-processor-scaler\n\n# Set the \"ConnectionString\" for the ServiceBus in the file ./orders/Keda.Samples.Dotnet.OrderGenerator/Program.cs\nwatch -n 1 kubectl -n keda get rs,pod\nwatch -n 1 az servicebus queue list -g \u003crg-name\u003e --namespace-name \u003csb-name\u003e -otsv --query \"[].messageCount\"\n\ndotnet run --project ./orders/Keda.Samples.Dotnet.OrderGenerator/Keda.Samples.Dotnet.OrderGenerator.csproj\nkubectl -n keda events\n```\n\n## cluster-autoscaler\n\nThis demo uses the cluster-autoscaler (needs to be activated on AKS)\n\n```bash\nkubectl create ns cluster\nkubectl -n cluster run nginx --image nginx --replicas 500\nkubectl -n cluster events\nkubectl -n cluster get nodes -w\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhiteducksoftware%2Faks-scaling-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwhiteducksoftware%2Faks-scaling-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwhiteducksoftware%2Faks-scaling-examples/lists"}