> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Course Introduction

> A practical course teaching Kubernetes autoscaling techniques including manual scaling, HPA, VPA, CPA and KEDA with hands on labs and debugging for production readiness

Kubernetes has become the de facto platform for running cloud-native applications and is often referred to as the "Linux of the cloud." As AI services scale, Kubernetes plays a central role powering platforms like Poe, Anthropic's Claude, ChatGPT, and many other AI-driven products. Demand for Kubernetes expertise continues to grow — a 2022 Indeed survey reported Kubernetes as the fastest-growing job search term (173% year-over-year), and that momentum carried through 2023 and 2024.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/Xy-QQj1elzzjSGkz/images/Kubernetes-Autoscaling/Introduction/Course-Introduction/indeed-tech-skills-kubernetes-173.jpg?fit=max&auto=format&n=Xy-QQj1elzzjSGkz&q=85&s=3d6c36689fe717ec8f5e654f8bca1df0" alt="A slide from an Indeed survey showing ranked tech skills by year-over-year job search growth, with Kubernetes #1 at 173% growth. The list highlights fast-growing cloud and e-commerce skills like Magento, Verilog, Golang and others." width="1920" height="1080" data-path="images/Kubernetes-Autoscaling/Introduction/Course-Introduction/indeed-tech-skills-kubernetes-173.jpg" />
</Frame>

This course focuses on building practical autoscaling skills for Kubernetes so you can demonstrate credibility and value in production environments. I'm Michael Forrest, and I will guide you through core autoscaling concepts, architectures, and hands-on labs designed to help you experiment, iterate, and learn by doing.

<Callout icon="lightbulb" color="#1CB2FE">
  Ensure your `kubectl` is configured to point at a working Kubernetes cluster before attempting the lab commands used in this lesson.
</Callout>

To inspect API server flags (for example, admission-related flags) on a control-plane pod, you can run:

```bash theme={null}
kubectl exec -n kube-system kube-apiserver-controlplane \
  -- kube-apiserver -h | grep enable-admission
```

Course roadmap

* Manual scaling — develop intuition for how workloads react to replica changes and pod lifecycle events.
* Horizontal Pod Autoscaler (HPA) — automation for scaling replicas based on CPU, memory, custom metrics, and external metrics.
* Vertical Pod Autoscaler (VPA) — adjust pod resource requests and limits with recommendations or automated updates.
* Cluster Proportional Autoscaler (CPA) — scale control-plane or infrastructure controller replicas proportionally to cluster size.
* KEDA — event-driven autoscaling for external event sources (queues, cron, Redis, etc.).

Course roadmap (summary table)

| Topic                                 | Purpose                                            | Key concepts / examples                                                          |
| ------------------------------------- | -------------------------------------------------- | -------------------------------------------------------------------------------- |
| Manual scaling                        | Understand pod lifecycle under scale operations    | `kubectl scale`, `kubectl get pods`, readiness/probes                            |
| HPA (Horizontal Pod Autoscaler)       | Autoscale replica counts by metrics                | CPU/memory, custom metrics, external metrics, metrics-server, Prometheus Adapter |
| VPA (Vertical Pod Autoscaler)         | Tune pod resource requests/limits                  | Recommendation vs. update modes (`Off`, `Auto`, `Initial`)                       |
| CPA (Cluster Proportional Autoscaler) | Scale controller replicas with cluster growth      | Node/CPU-based ladders, include/exclude unschedulable nodes                      |
| KEDA                                  | Event-driven autoscaling based on external sources | Redis queue length, cron, Kafka, Azure/AWS integrations                          |

Manual scaling and pods
Manually scaling deployments and inspecting pod status is the first hands-on step. Use `kubectl` to observe how pods are created, initialized, and become ready.

```bash theme={null}
kubectl get pods

# sample output
NAME                                  READY   STATUS      RESTARTS   AGE
flask-web-app-5d9dbb9d44-spjm         0/1     Init:0/1    0          4s
flask-web-app-78689f449c-kq8xs        1/1     Running     0          12m
```

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/Xy-QQj1elzzjSGkz/images/Kubernetes-Autoscaling/Introduction/Course-Introduction/kubernetes-autoscaling-slide-kodekloud-instructor.jpg?fit=max&auto=format&n=Xy-QQj1elzzjSGkz&q=85&s=3425f60dd21e112abc8a421faa64318b" alt="A split-screen image: the left side is a slide titled &#x22;Kubernetes Autoscaling&#x22; listing options (Manual Scaling, HPA, VPA, CPA, KEDA), and the right side shows a bearded man in a purple &#x22;KodeKloud&#x22; shirt speaking into a microphone." width="1920" height="1080" data-path="images/Kubernetes-Autoscaling/Introduction/Course-Introduction/kubernetes-autoscaling-slide-kodekloud-instructor.jpg" />
</Frame>

Horizontal Pod Autoscaler (HPA)
The HPA automates replica scaling based on observed metrics. In this course you'll learn:

* The HPA control loop and how it queries metrics providers.
* Native HPA using resource metrics (CPU/memory) via `metrics-server`.
* Custom and external metrics via adapters (Prometheus Adapter, custom metrics API).
* Installation requirements and debugging steps (how to verify metrics, HPA events, and controller behavior).

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/Xy-QQj1elzzjSGkz/images/Kubernetes-Autoscaling/Introduction/Course-Introduction/hpa-architecture-traditional-cpu-memory-presenter.jpg?fit=max&auto=format&n=Xy-QQj1elzzjSGkz&q=85&s=d7c230a983db174967f83401ebabb1f9" alt="A presentation slide titled &#x22;HPA Architecture Framework&#x22; showing CPU and Memory icons inside a rounded box labeled &#x22;Traditional/Native HPA.&#x22; A small circular video thumbnail of a presenter appears in the bottom-right corner." width="1920" height="1080" data-path="images/Kubernetes-Autoscaling/Introduction/Course-Introduction/hpa-architecture-traditional-cpu-memory-presenter.jpg" />
</Frame>

Vertical Pod Autoscaler (VPA)
VPA focuses on right-sizing pods by providing resource recommendations and (optionally) updating pod resource requests. Key points covered:

* VPA architecture and how it samples resource usage over time.
* `updateMode` behavior: `Off` (recommendations only), `Auto` (apply), `Initial` (set only at pod creation).
* Resource policies for fine-grained control per container.

Example VPA manifest:

```yaml theme={null}
---
apiVersion: autoscaling.k8s.io/v1
kind: VerticalPodAutoscaler
metadata:
  name: flask-app
spec:
  targetRef:
    apiVersion: apps/v1
    kind: Deployment
    name: flask-app
  updatePolicy:
    updateMode: "Off"
  resourcePolicy:
    containerPolicies:
      # Add container-specific policies as needed, for example:
      # - containerName: "flask-container"
      #   mode: "Auto"
```

VPA is most useful when you need to increase per-pod resources (CPU/memory) rather than changing replica counts — for example, stateful workloads or pods where vertical tuning yields better performance.

Cluster Proportional Autoscaler (CPA)
CPA scales controller replicas (such as controllers for DaemonSets or infrastructure components) proportionally to the cluster — by node count or aggregate CPU. Labs include ladder configurations and demonstrate how CPA handles priorities and preemption.

Example ladder configuration (YAML containing JSON for the ladder payload):

```yaml theme={null}
data:
  ladder: |-
    {
      "coresToReplicas": [],
      "nodesToReplicas": [],
      "includeUnschedulableNodes": false
    }
```

KEDA — Kubernetes Event-Driven Autoscaling
KEDA integrates with Kubernetes to enable autoscaling from external event sources and schedulers. You’ll build demos that trigger scaling from Redis queues, cron schedules, and other event sources using KEDA scalers.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/Xy-QQj1elzzjSGkz/images/Kubernetes-Autoscaling/Introduction/Course-Introduction/keda-introduction-feature-cards-webcam.jpg?fit=max&auto=format&n=Xy-QQj1elzzjSGkz&q=85&s=1b0abbfc0b3bcc298d4cf4e12384de23" alt="A presentation slide titled &#x22;KEDA – Introduction&#x22; showing the KEDA logo above three feature cards labeled &#x22;Event-driven Autoscaler,&#x22; &#x22;External events, volume based,&#x22; and &#x22;Kubernetes-native integration.&#x22; A small circular webcam overlay with a speaker appears in the lower-right corner." width="1920" height="1080" data-path="images/Kubernetes-Autoscaling/Introduction/Course-Introduction/keda-introduction-feature-cards-webcam.jpg" />
</Frame>

Each section blends theory with practical labs so you can design, deploy, and operate advanced autoscaling strategies in real clusters. Labs are intentionally hands-on to encourage experimentation, troubleshooting, and learning from mistakes.

Community and next steps
Join the KodeKloud community to ask questions, share discoveries, and collaborate with other learners — community engagement accelerates learning and deepens practical understanding.

Now that the course outline is set, proceed to the first lab to practice manual scaling and get comfortable with `kubectl` workflows.

Links and References

* [Kubernetes Documentation](https://kubernetes.io/docs/)
* [Horizontal Pod Autoscaler (HPA)](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)
* [Vertical Pod Autoscaler (VPA)](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler)
* [Cluster Proportional Autoscaler (CPA) — autoscaler repo](https://github.com/kubernetes/autoscaler)
* [KEDA documentation](https://keda.sh/docs/)
* [metrics-server](https://github.com/kubernetes-sigs/metrics-server)
* [Prometheus Adapter (custom/external metrics)](https://github.com/kubernetes-sigs/prometheus-adapter)

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/kubernetes-autoscaling/module/13b7ea01-bb9e-497b-a190-aafcddaa3f11/lesson/a0518bc3-09b2-441b-bf02-7718e42a327a" />
</CardGroup>
