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
- Install Metrics Server separately.
- Set CPU requests on containers; utilization is a percentage of the request.
Horizontal vs vertical
Horizontal scaling adds Pods; vertical scaling gives existing Pods more CPU or memory.
Claims
- id: C1 claim: A HorizontalPodAutoscaler automatically updates a workload resource. source: S1 evidence: "In Kubernetes, a HorizontalPodAutoscaler automatically updates a workload resource (such as"
- id: C2 claim: Horizontal scaling responds to load by deploying more Pods. source: S1 evidence: "Horizontal scaling means that the response to increased load is to deploy more"
- id: C3 claim: Metrics usually come from Metrics Server, launched separately. source: S1 evidence: "usually provided by an add-on named Metrics Server, which needs to be launched separately."
- id: C4 claim: kubectl autoscale can create an HPA. source: S2 evidence: "kubectl autoscale deployment php-apache --cpu=50% --min=1 --max=10"
Sources
- [S1] Horizontal Pod Autoscaling. Kubernetes Authors. https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/ . License: CC BY 4.0 (kubernetes/website). Accessed 2026-11-04.
- [S2] HorizontalPodAutoscaler Walkthrough. Kubernetes Authors. https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale-walkthrough/ . License: CC BY 4.0 (kubernetes/website). Accessed 2026-11-04.
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
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.},
}
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.