> Markdown version of [/videos/813-fifty-shades-of-kubernetes-autoscaling?t=6](https://www.wearedevelopers.com/videos/813-fifty-shades-of-kubernetes-autoscaling?t=6). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Fifty Shades of Kubernetes Autoscaling Simple Kubernetes pod replication isn't enough for hyperscale traffic. Discover how to leverage VPA, Carpenter, and KEDA to perfectly right-size operations and eliminate resource waste. - **Speakers:** Mario-Leander Reimer - **Event:** World Congress 2023 - **Published:** November 10, 2023 - **Duration:** 30:26 - **URL:** https://www.wearedevelopers.com/videos/813-fifty-shades-of-kubernetes-autoscaling ## Summary Modern cloud-native applications demand robust elasticity to handle hyperscale workloads while optimizing operational expenses (OPEX). Navigating Kubernetes autoscaling goes beyond simple horizontal pod replication; it involves a multidimensional approach encompassing scaling workloads horizontally and vertically, alongside expanding or compacting the cluster infrastructure itself. At its core, Kubernetes relies heavily on a constant stream of events—acting as a "big state machine"—and detailed metrics to orchestrate these dynamic elasticity decisions. The internal metrics registry powers this ecosystem through three distinct APIs: standard resource metrics, custom object metrics like ingress throughput, and external metrics that can hook into systems like Prometheus to trigger scaling based on business signals such as active shopping cart sessions. Effectively right-sizing deployments prevents both performance bottlenecks and resource waste. While the Vertical Pod Autoscaler (VPA) can forcefully resize pods, running it in "recommendation mode" during load testing provides a safer methodology to pinpoint ideal CPU and memory requirements without arbitrary restarts in production. For horizontal scale-outs under pressure, the default Horizontal Pod Autoscaler (HPA) manages pod replication flawlessly, but a cluster can quickly run out of available nodes. When pods remain in a pending state, standard cluster autoscalers step in to provision new nodes. For teams operating on AWS, utilizing Carpenter offers a significantly faster, provider-agnostic mechanism capable of mixing reserved infrastructure with cost-effective spot instances based on immediate capacity limits. Beyond standard CPU boundaries, tools like KEDA introduce event-driven autoscaling, enabling queue-based or message-driven architectures to efficiently scale to zero when idling, saving crucial baseline costs. To keep environments densely packed and defragmented as workload volume retracts, administrators should leverage the Kubernetes Descheduler. Ultimately, infrastructure automation is only as resilient as the workloads running upon it; executing a completely successful scale-down demands that applications are smart enough to intercept container termination signals and gracefully drain existing active connections before shutdown. **Keywords:** kubernetes autoscaling, horizontal pod autoscaler, vertical pod autoscaler, cluster autoscaling strategies, metrics registry apis, prometheus custom metrics, aws carpenter spot instances, keda event-driven scaling, kubernetes descheduler defragmentation, graceful pod termination, cloud-native elasticity, scale-to-zero architecture, workload right-sizing, infrastructure node provisioning ## Chapters 1. **Transitioning to cloud native hyperscale applications** (00:06) — Building fault-tolerant applications requires modern infrastructure mechanisms to support continuous delivery and extreme workload scalability. 1. **Understanding elasticity in scaling workloads and clusters** (03:25) — Handling varying system demands involves horizontal workload spreading, vertical resource upgrades, and dynamic host defragmentation. 1. **Leveraging events and multi-tier metrics for scaling** (06:07) — Modern autoscalers utilize continuous node state events bridging standard object properties with custom infrastructure registries. 1. **Configuring horizontal pod autoscaling with diverse metrics** (10:55) — Horizontal pod configurations dynamically manipulate container replica counts based on defined threshold endpoints and traffic fluctuations. 1. **Using vertical pod autoscalers for workload rightsizing** (15:33) — Running resource-hungry dependencies in recommendation mode identifies actual processing thresholds instead of relying on baseline guesses. 1. **Managing node capacity with default cluster autoscaling** (17:35) — Aggressive scaling profiles automatically spin up virtual machine segments exactly when deployment demands exceed existing capacity blocks. 1. **Accelerating node provisioning with rapid spot instances** (21:08) — Adopting an agnostic bare-metal autoscaler isolates unpredictable batch costs strictly to immediately expendable spot hardware. 1. **Implementing event-driven component scaling for message queues** (26:14) — Event-based scalers allow background application listeners to entirely drop capacity down to zero against empty transmission pipes. 1. **Essential components for robust infrastructure capacity planning** (27:21) — A comprehensive cloud footprint perfectly meshes endpoint metric servers, specific application scalers, and node balancing tools. 1. **Graceful workload termination and cluster autoscaler reliability** (28:22) — Safely trapping pod shutdown signals ensures active transactions naturally drain before automated hardware consolidations destroy processes. ## Related Moments - [Evaluating auto-scalable infrastructure and capacity resource requirements](https://www.wearedevelopers.com/videos/1171-answering-the-million-dollar-question-why-did-i-break-production) (from "Answering the Million Dollar Question: Why did I Break Production?") - [Analyzing cluster right-sizing and scaling experiments inside Kubernetes](https://www.wearedevelopers.com/videos/1198-minimising-the-carbon-footprint-of-workloads) (from "Minimising the Carbon Footprint of Workloads") - [Deploying intelligent cluster node auto-provisioning software](https://www.wearedevelopers.com/videos/2100-azure-well-architected-framework-cost-optimization-in-practice) (from "Azure-Well Architected Framework - Cost Optimization in practice") - [Aligning auto scaling infrastructure costs with real business value](https://www.wearedevelopers.com/videos/100111-5-years-in-cloud-native-the-good-the-bad-and-the-bill) (from "5 Years in Cloud Native: The Good, the Bad, and the Bill") - [Configuring horizontal autoscaling for language models with KServe](https://www.wearedevelopers.com/videos/1222-devops-for-ai-running-llms-in-production-with-kubernetes-and-kubeflow) (from "DevOps for AI: running LLMs in production with Kubernetes and KubeFlow") - [Scaling development environment resources through cloud deployments](https://www.wearedevelopers.com/videos/469-solve-the-but-it-works-on-my-machine-problem-with-cloud-based-development-environments) (from "Solve the “But it works on my machine!” problem with cloud-based development environments") ## Related Articles - [Learning Kubernetes made easy with KubeCampus](https://www.wearedevelopers.com/magazine/348-learning-kubernetes-made-easy-with-kubecampus) - [MLops – Deploying, Maintaining And Evolving Machine Learning Models in Production](https://www.wearedevelopers.com/magazine/115-mlops-deploying-maintaining-and-evolving-machine-learning-models-in-production) - [Why Event-Driven Architecture Isn’t About Speed (and When You Actually Need It)](https://www.wearedevelopers.com/magazine/745-why-event-driven-architecture-isn-t-about-speed-and-when-you-actually-need-it) - [Dev Digest 120 - Apple and peers](https://www.wearedevelopers.com/magazine/455-dev-digest-120-apple-and-peers) ## Related Jobs - [Platform Engineer (DevOps)](https://www.wearedevelopers.com/jobs/48264-platform-engineer-devops) at **WDW Consulting GmbH** - [Devops Engineer](https://www.wearedevelopers.com/jobs/ext/1940926-devops-engineer) at **Bitpanda** - [Lead Cloud DevSecOps Engineer - Kubernetes](https://www.wearedevelopers.com/jobs/ext/1659167-lead-cloud-devsecops-engineer-kubernetes) at **BWI GmbH** - [Cloud Engineer](https://www.wearedevelopers.com/jobs/ext/652417-cloud-engineer) at **BWI GmbH** - [DevOps Engineer (m/f/d)](https://www.wearedevelopers.com/jobs/48303-devops-engineer-m-f-d) at **basebox GmbH** - [Cloud Foundations Team](https://www.wearedevelopers.com/jobs/ext/1483289-cloud-foundations-team) at **GitHub**