Kubernetes Autoscaling

Vertical Pod Autoscaler VPA

VPA Setup Demo

Welcome back! In this lesson, we’ll prepare our environment for a hands-on demo of the Vertical Pod Autoscaler (VPA). Before applying any manifests, you need a solid understanding of Custom Resource Definitions (CRDs), which power the VPA’s custom behaviors in Kubernetes.

Table of Contents

  1. What Are Custom Resource Definitions (CRDs)?
  2. VPA-Specific CRDs
  3. Summary of VPA CRDs
  4. References

What Are Custom Resource Definitions (CRDs)?

Custom Resource Definitions extend Kubernetes’ API by letting you introduce new resource types. Built-in objects include Pods, Services, and Deployments, but CRDs allow you to teach the API “new words”—for example, VerticalPodAutoscaler. When you register a CRD:

  • The Kubernetes API server recognizes your custom resource kind.
  • You can create, read, update, and delete custom objects just like native ones.
  • Controllers and operators watch these new objects and implement the logic you define.

Note

Ensure your cluster has the apiextensions.k8s.io API enabled before applying any CRDs. For more details, see Kubernetes CRD Documentation.


VPA-Specific CRDs

The Vertical Pod Autoscaler relies on two CRDs to function:

  • VerticalPodAutoscaler
    Continuously observes pod CPU and memory usage, then recalculates optimal resource requests.

  • VerticalPodAutoscalerCheckpoint
    Persists historical usage metrics so that the VPA controller can make data-driven recommendations, even after restarts or failures.

[!note] The diagram below shows how these two CRDs interact within the VPA architecture.

The image is a diagram showing two types of Vertical Pod Autoscaler (VPA) CRDs: "Vertical Pod Autoscaler CRD" with functions to monitor container CPU and memory, and "Vertical Pod Autoscaler Checkpoint CRD."


Summary of VPA CRDs

CRD NameRoleHow It Helps
VerticalPodAutoscalerReal-time resource tuningAdjusts CPU/memory requests
VerticalPodAutoscalerCheckpointHistorical usage checkpointingStores past metrics to guide scaling

With these two CRDs in place, your cluster gains dynamic resource optimization—pods automatically resize CPU and memory requests based on actual demand and historical data. Next, we’ll dive into installing and configuring the VPA controller and sample manifests.


References

Watch Video

Watch video content

Practice Lab

Practice lab

Previous
VPA Architecture