31 lines
1.2 KiB
Markdown
31 lines
1.2 KiB
Markdown
---
|
||
title: "Cluster Autoscaler"
|
||
type: concept
|
||
tags: [Kubernetes, 自动扩缩容, 云原生]
|
||
sources: [ctp-topic-70-eks-deployment-using-iac, ctp-topic-64-scaling-out-with-amazon-eks]
|
||
last_updated: 2026-04-24
|
||
---
|
||
|
||
# Cluster Autoscaler
|
||
|
||
## Overview
|
||
Cluster Autoscaler 是 Kubernetes 的自动扩缩容组件,根据资源需求自动调整 Worker Node 的数量,实现基础设施的弹性伸缩。
|
||
|
||
## How It Works
|
||
1. **监控资源使用情况**:定期检查 Pod 的调度状态
|
||
2. **检测资源不足**:当 Pod 因资源不足无法调度时触发扩容
|
||
3. **调用云提供商的 API**:AWS 上与 Auto Scaling Groups 集成
|
||
4. **自动启动新节点**:在可用区中启动新 EC2 实例
|
||
5. **缩容检测**:当节点利用率低且 Pod 可安全驱逐时,触发缩容
|
||
|
||
## AWS Integration
|
||
- 与 AWS Auto Scaling Groups 深度集成
|
||
- 支持多个 Auto Scaling Groups
|
||
- 根据 Pod 需求自动选择合适的实例类型
|
||
|
||
## Related Concepts
|
||
- [[Amazon EKS]]:Cluster Autoscaler 部署的目标平台
|
||
- [[Kubernetes]]:Cluster Autoscaler 是 Kubernetes 的核心组件
|
||
- [[Horizontal Pod Autoscaler (HPA)]]:Pod 级别的水平扩缩容(HPA 扩 Pod,CA 扩 Node)
|
||
- [[Vertical Pod Autoscaler (VPA)]]:Pod 级别的垂直扩缩容
|