← All notes

Kubernetes Horizontal Pod Autoscaling

Answer:

Quick start

kubectl autoscale deployment php-apache --cpu=50% --min=1 --max=10
kubectl get hpa --watch

Declarative

apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata: {name: php-apache}
spec:
  scaleTargetRef: {apiVersion: apps/v1, kind: Deployment, name: php-apache}
  minReplicas: 1
  maxReplicas: 10
  metrics:
  - type: Resource
    resource: {name: cpu, target: {type: Utilization, averageUtilization: 50}}

Requirements

Horizontal vs vertical

Horizontal scaling adds Pods; vertical scaling gives existing Pods more CPU or memory.

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Kubernetes Authors, Horizontal Pod Autoscaling, CC BY 4.0 (kubernetes/website); Kubernetes Authors, HorizontalPodAutoscaler Walkthrough, CC BY 4.0 (kubernetes/website).

Cite this

Permanent ID: iil:note:jzzq0esy

iinventedlight. 2026. "Kubernetes Horizontal Pod Autoscaling." iinventedlight Library, iil:note:jzzq0esy, version of 2026-11-04. https://iinventedlight.com/library/notes/kubernetes-horizontal-pod-autoscaling/. License: CC-BY-4.0.

@misc{iil_note_jzzq0esy,
  author = {{iinventedlight}},
  title = {{Kubernetes Horizontal Pod Autoscaling}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-04},
  url = {https://iinventedlight.com/library/notes/kubernetes-horizontal-pod-autoscaling/},
  note = {Permanent ID iil:note:jzzq0esy. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.

For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/kubernetes-horizontal-pod-autoscaling.md.