Auto-sync: update nexus workspace

This commit is contained in:
2026-04-29 07:09:24 +08:00
parent 15cd44b2ca
commit 070bd42886
36 changed files with 1602 additions and 221 deletions

View File

@@ -0,0 +1,30 @@
---
title: "Karpenter"
type: concept
tags: [AWS, Kubernetes, EKS, autoscaling, node-provisioning]
last_updated: 2026-04-28
---
## Definition
Karpenter 是 AWS 开源的 Kubernetes 节点自动配置工具Node Auto-Provisioner通过动态创建最优实例类型来响应未调度 Pod 的资源需求,替代传统的 Cluster Autoscaler。相比 Cluster Autoscaler 基于节点组Node Group的扩缩容模式Karpenter 直接与 EC2 API 交互,根据 Pod 规格CPU/内存/GPU 需求)即时选择最合适的 EC2 实例类型,实现更快的扩容速度和更低的资源浪费。
## Key Mechanisms
- **即时节点供给**:监听未调度 Pod 事件,秒级启动新节点,无需等待节点组预配置
- **最佳实例选择**:根据 Pod 资源请求从 EC2 实例类型池中选择最优匹配
- **多样化实例类型**:支持多种 EC2 类型CPU/GPU/Spot/On-Demand灵活利用 Spot 实例节省成本
- **标签驱动配置**:通过 `NodeTemplate` 定义标签/要求,自动匹配特定 Pod 到特定节点
- **与 Cluster Autoscaler 的区别**Cluster Autoscaler 依赖节点组规模调整Karpenter 直接控制 EC2 实例创建,响应更快速灵活
## Relationship with Cluster Autoscaler
Karpenter 是 Cluster Autoscaler 的替代/演进方案:
- Cluster Autoscaler 通过调整节点组规模间接扩缩节点
- Karpenter 直接与 EC2 API 交互创建/终止节点,更快速灵活
- EKS Auto ModePart 3 of 3已集成 Karpenter 作为 Carpenter Controller 组件
## Sources
- [[ctp-topic-70-eks-deployment-using-iac]]
- [[public-cloud-learning-sessions-eks-optimization-part-1-of-3-compute-optimization]]
- [[public-cloud-learning-sessions-eks-optimization-part-3-of-3-introduction-to-eks]]