오토스케일링
오토스케일링은 수요 변화에 따라 워크로드를 자동으로 조정하는 방식입니다.
구조와 동작 원리
구성 요소와 배치 원칙 (조사 기반 개념 설명 · 연결 순서나 토폴로지는 특정하지 않음)
HPA는 레플리카 수, VPA는 파드 리소스 요청, Cluster Autoscaler/NAP는 노드 용량을 조정하는 주요 구성요소입니다.
로컬 스토리지 의존 파드·컨트롤러 없는 파드·PDB는 노드 축소를 막을 수 있어 배치 시 분리와 PDB 설계가 필요합니다.
리소스 수요 변화에 더 탄력적·효율적으로 대응하는 문제를 해결합니다.
기대 효과
수요 변동 워크로드에서 파드·노드를 줄여 비용 절감과 탄력성을 얻습니다.
트레이드오프
스케일 인/아웃 시 파드 재배치·삭제로 일시적 중단이 발생할 수 있습니다.
HPA와 VPA를 같은 CPU/메모리 지표에 함께 쓰면 충돌할 수 있어 주의해야 합니다.
운영 및 적용 가이드
종합 설명 · 원문 인용으로 검증된 항목과 구분됩니다. 실제 적용 전 확인이 필요합니다.
언제 사용하는가
수요 변동이 큰 무상태 웹/API 서비스에서 HPA로 레플리카를 조정하고, 파드가 Pending이면 Cluster Autoscaler로 노드를 확장하는 유스케이스가 대표적입니다.
시나리오
커머스 SaaS 기업이 3개 노드풀과 수십 개 마이크로서비스를 운영하며 평일 업무시간과 프로모션에 트래픽이 급증합니다. HPA로 주문 API를 CPU/RPS 기반 2~50 레플리카로 확장하고, Pending 발생 시 CA가 노드풀을 늘리며 야간에는 축소해 비용을 줄입니다. 요구사항은 p95 응답시간 유지, 무중단 배포, 월 인프라 비용 상한 준수입니다.
배치 원칙
- Deployment 등 무상태 워크로드에 HPA, 수직 확장 워크로드에 VPA를 배치
- Cluster Autoscaler는 노드풀 단위로 구성하고 워크로드별 노드풀 분리
- metrics-server와 모니터링은 클러스터 공통 컴포넌트로 배치
- 로컬 스토리지 의존 파드와 PDB는 노드 축소를 막을 수 있어 분리·설계
- 중단 민감 워크로드는 다중 레플리카·PDB·노드 분산으로 배치
온프레미스
온프레미스는 metrics-server와 모니터링, CA 프로바이더 연동을 직접 설치·운영하고 노드 증설 한도와 전원·네트워크 용량을 사전 계획해야 합니다. HPA/VPA 임계값과 안정화 윈도우를 부하테스트로 튜닝합니다.
클라우드
관리형 Kubernetes별 CA/NAP 설정 차이를 확인하고 노드풀·자동확장 범위·비용 한도를 콘솔과 IaC로 관리합니다. 스팟·예약 인스턴스, PDB, 다중 AZ를 함께 고려해 비용과 가용성을 균형화합니다.
Kubernetes
Deployment/StatefulSet에 HPA를 연결하고 requests/limits, readiness/startup probe, stabilization window를 설정합니다. VPA는 HPA와 같은 CPU/메모리 지표 충돌을 피하고 updateMode를 단계적으로 적용합니다. CA는 Pending, 축소 지연, PDB, 로컬볼륨을 모니터링합니다.
장애 대응
대표 장애는 metrics-server 장애로 인한 HPA ScalingActive=False/FailedGetResourceMetric, 스케일 업 후 Pending(CA 한도/미동작), PDB·로컬스토리지로 인한 노드 미축소입니다. 절차는 kubectl top과 HPA 상태·이벤트 확인, metrics-server/메트릭 API 복구, Pending 시 노드풀/CA 한도 확인, 축소 지연 시 PDB·로컬볼륨·annotation 점검, 필요 시 임시 수동 스케일 또는 롤백입니다.
14개 관점별 근거
조사 당시 근거 보유 여부입니다. 출처의 정확성과 최신성을 별도로 판단하세요.
정의·개요근거 있음
오토스케일링은 수요 변화에 따라 워크로드를 자동으로 조정하는 방식입니다.
With autoscaling, you can automatically update your workloads in one way or another.해결하는 문제근거 있음
리소스 수요 변화에 더 탄력적·효율적으로 대응하는 문제를 해결합니다.
This allows your cluster to react to changes in resource demand more elastically and efficiently.주요 구성 컴포넌트·리소스근거 있음
HPA는 레플리카 수, VPA는 파드 리소스 요청, Cluster Autoscaler/NAP는 노드 용량을 조정하는 주요 구성요소입니다.
Horizontal Pod Autoscaler (HPA) | Stateless or partitionable workloads with variable demand | CPU utilization, RPS, queue depth데이터·에셋 배치 원칙근거 있음
로컬 스토리지 의존 파드·컨트롤러 없는 파드·PDB는 노드 축소를 막을 수 있어 배치 시 분리와 PDB 설계가 필요합니다.
Nodes never removed | A pod with local storage / no controller / a blocking PDB대표 유스케이스근거 있음
HPA는 수요 변동이 있는 무상태·분할 가능 워크로드에 적합합니다.
Horizontal Pod Autoscaler (HPA) | Stateless or partitionable workloads with variable demand | CPU utilization, RPS, queue depth시나리오 예시근거 있음
업무 시간·야간·주말처럼 수요가 달라지는 운영 시나리오에 적용합니다.
such as between workdays and evenings or weekends부적합 상황·주의근거 있음
HPA와 VPA를 같은 CPU/메모리 지표에 함께 쓰면 충돌할 수 있어 주의해야 합니다.
avoid using HPA and VPA on the same metrics (CPU and memory) because they can conflict.온프레미스 관점(개발·배포·운영)근거 있음
온프레미스는 metrics-server 등 지표 파이프라인을 직접 설치·운영해야 합니다.
The HPA reads CPU and memory usage from the Metrics API (`metrics.k8s.io`), which is served by metrics-server.클라우드 관점(개발·배포·운영)근거 있음
클라우드는 GKE/EKS/AKS 등 관리형 Kubernetes별 CA 연동·설정 차이를 확인하고 제공자 콘솔/문서에 따라 구성합니다.
Provider-specific integrations (GKE, EKS, AKS, on-prem, etc.) differ in setup.Kubernetes 관점(개발·배포·운영)근거 있음
Kubernetes에서는 HPA가 Deployment/StatefulSet 등 워크로드 리소스를 자동 갱신합니다.
a HorizontalPodAutoscaler automatically updates a workload resource (such as a Deployment or StatefulSet)장애 대응 관점근거 있음
스케일 업 후 파드 Pending이면 노드 오토스케일러 미동작/한도, metrics-server 장애, PDB·로컬스토리지로 인한 노드 미축소를 점검합니다.
Pods `Pending` after scale-up | Node autoscaler not working, or at its limit장점근거 있음
수요 변동 워크로드에서 파드·노드를 줄여 비용 절감과 탄력성을 얻습니다.
can help you achieve cost savings for workloads that see regular changes in demand단점·트레이드오프근거 있음
스케일 인/아웃 시 파드 재배치·삭제로 일시적 중단이 발생할 수 있습니다.
If resources are deleted or moved when autoscaling your cluster, your workloads might experience transient disruption.대표 기술·도구근거 있음
HPA, VPA, Cluster Autoscaler(노드 오토스케일링)가 대표 기술·도구입니다.
HPA, VPA, and node autoscaling each answer a different question.추가 참고 문헌 (19)
- AKS Scaling Overview — HPA, VPA, Cluster Autoscaler, and KEDA - Azure Kubernetes Service | Microsoft Learn ↗
- Autoscaling Workloads | Kubernetes ↗
- Kubernetes Autoscaling - 3 Common Methods Explained ↗
- Kubernetes autoscaling guide: determine which solution is right for your use case | Datadog ↗
- Simplified autoscaling concepts for AI/ML workloads in GKE | GKE AI/ML | Google Cloud Documentation ↗
- Module 2.9: Workload Autoscaling | KubeDojo ↗
- The Autoscaling Trinity: HPA, VPA, and Cluster Autoscaler Together | k8s Guru ↗
- Cluster autoscaling in Azure Kubernetes Service (AKS) overview - Azure Kubernetes Service | Microsoft Learn ↗
- Horizontal Pod Autoscaling (HPA) on Azure Kubernetes Service (AKS) - Azure Kubernetes Service | Microsoft Learn ↗
- Horizontal Pod Autoscaling | Kubernetes ↗
- HPA, VPA & Cluster Autoscaler (CKA, CKAD & KCNA) ↗
- Autoscaling: HPA, VPA, Cluster Autoscaler, Karpenter, KEDA - System Design Notes ↗
- The Power of Autoscaling: A Deep Dive into HPA, VPA, and Cluster Autoscaler | Sealos Blog ↗
- VerticalPodAutoscaler Went Rogue: It Took Down Our Cluster, with Thibault Jamet | KubeFM ↗
- Shoot Pod Autoscaling Best Practices | Gardener ↗
- About GKE cluster autoscaling | Google Kubernetes Engine (GKE) | Google Cloud Documentation ↗
- Autoscaling: HPA, VPA, Cluster Autoscaler & Karpenter | WorksOnMyCluster ↗
- cluster-autoscaler/FAQ.md ↗
- Troubleshoot vertical Pod autoscaling | Google Kubernetes Engine (GKE) | Google Cloud Documentation ↗