Auto-sync: update nexus workspace
This commit is contained in:
@@ -1,30 +1,39 @@
|
||||
---
|
||||
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 级别的垂直扩缩容
|
||||
---
|
||||
title: "Cluster Autoscaler"
|
||||
type: concept
|
||||
tags:
|
||||
- Kubernetes
|
||||
- EKS
|
||||
- Autoscaling
|
||||
- Node
|
||||
- AWS
|
||||
- ASG
|
||||
sources:
|
||||
- ctp-topic-64-scaling-out-with-amazon-eks
|
||||
- ctp-topic-70-eks-deployment-using-iac
|
||||
last_updated: 2026-04-28
|
||||
---
|
||||
|
||||
## Definition
|
||||
Cluster Autoscaler 是 Kubernetes 官方的节点(Node)级别扩缩容组件,通过联动 AWS Auto Scaling Group(ASG)或托管节点组(Managed Node Group),根据集群内 Pending Pod 的数量和资源请求自动调整节点数量。
|
||||
|
||||
## Key Mechanisms
|
||||
- **扩缩容决策依据**:集群内 Pending Pod 的数量(而非直接基于资源利用率)
|
||||
- **资源请求感知**:考虑 Pod 的 CPU/内存 requests,不仅仅是当前实际使用量
|
||||
- **ASG/节点组联动**:更新 ASG 或托管节点组的期望容量(Desired Capacity)
|
||||
- **Auto-discovery 模式**:推荐使用,自动发现和管理 ASG
|
||||
- **Mixed Instances Policy**:支持在同一 ASG 中混合使用多种 EC2 实例类型
|
||||
- **配置变更**:min/max 配置变更应在 ASG/托管节点组层面操作,而非直接修改 Cluster Autoscaler
|
||||
|
||||
## Relationship with Karpenter
|
||||
- **Cluster Autoscaler**:基于节点组间接扩缩容,响应相对较慢
|
||||
- **Karpenter**:直接与 EC2 API 交互,响应更快速灵活,是 Cluster Autoscaler 的演进方案
|
||||
|
||||
## Limitations
|
||||
- 依赖预配置的 ASG/节点组,灵活性受限
|
||||
- 扩容速度受 ASG 启动新实例的速度限制
|
||||
- 无法处理需要特殊实例类型的工作负载
|
||||
|
||||
## Sources
|
||||
- [[ctp-topic-64-scaling-out-with-amazon-eks]]
|
||||
- [[ctp-topic-70-eks-deployment-using-iac]]
|
||||
|
||||
Reference in New Issue
Block a user