Files
nexus/wiki/sources/ctp-topic-70-eks-deployment-using-iac.md

69 lines
5.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "CTP Topic 70 EKS deployment using IAC"
type: source
tags: [AWS, EKS, IaC, Kubernetes, CTP]
sources: [raw/Cloud & DevOps/Public-Cloud-Learning-Sessions/04_EKS/ctp-topic-70-eks-deployment-using-iac]
last_updated: 2026-04-24
---
## Source File
- [[raw/Cloud & DevOps/Public-Cloud-Learning-Sessions/04_EKS/ctp-topic-70-eks-deployment-using-iac.md]]
## Summary用中文描述
- 核心主题EKSAmazon Elastic Kubernetes Service集群通过 IaC基础设施即代码方式部署涵盖容器与 VM 的对比、EKS 特性详解、Terraform 和 Service Catalog 两种部署方式,以及 EKS 集群与容器监控方案。
- 问题域:如何在企业 AWS Landing Zone 中通过标准化 IaC 流程部署和管理 EKS 集群,实现容器化工作负载的统一治理。
- 方法/机制:
- **两种部署方式**Terraform使用 `tera-grant.scl` 文件定义集群参数)+ AWS Service Catalog通过产品组合模块化部署
- **自定义网络**EMIENI Multi-IP解决 Pod IP 分配 CIDR 限制问题
- **自动扩缩容**Kubernetes Cluster Autoscaler 根据资源需求自动扩缩 Worker Node
- **监控栈**CloudWatch Agent + FluentBitDaemonSet+ Container Insights + AWS OpenTelemetry + Grafana
- 结论/价值:通过 SRE EKS 模块集成 Terraform/Service Catalog 两种 IaC 路径,实现 EKS 集群的标准化、可审计、可重复部署;配合 CloudWatch + Grafana 实现全栈可观测性。
## Key Claims用中文描述
- Kubernetes 相比 VM 具有更快的启动速度、更高的内存效率和更强的可移植性
- EKS 提供完全托管的控制平面,实现 Worker Node 的零停机滚动部署
- IAM RBAC Mapping 通过最小权限原则控制 EKS 集群访问
- SRE EKS 模块集成 ALB Ingress Controller 实现流量管理
- EMI 自定义网络通过虚拟 ENI 为 Pod 分配 IP 地址,解决 VPC CIDR 限制
- Kubernetes Cluster Autoscaler 根据资源需求自动扩缩 Worker Node
- CloudWatch Agent + FluentBit 以 DaemonSet 方式部署,负责日志和指标收集
## Key Quotes
> "Kubernetes is a framework for running distributed systems resiliently, automating rollouts/rollbacks, load balancing, and horizontal pod scaling." — 核心定义
> "EKS offers fully managed control planes and autoscaling worker nodes." — EKS 核心价值
> "Zero downtime rolling deployments for worker node updates" — EKS 高可用特性
> "IAM RBAC mapping for least privilege access" — EKS 安全模型
> "Service Catalog allows creating, organizing, and governing AWS resources with permission control." — Service Catalog 定位
## Key Concepts
- [[Kubernetes]]:容器编排框架,用于分布式系统的弹性运行,支持自动化部署/回滚、负载均衡和 Pod 水平扩缩容
- [[Amazon EKS]]Amazon Elastic Kubernetes ServiceAWS 托管的 Kubernetes 服务,提供完全托管的控制平面和自动扩缩的 Worker Node
- [[Infrastructure as Code]]IaC通过代码定义和管理基础设施实现标准化、可审计、可重复的部署
- [[AWS Service Catalog]]AWS 服务,允许组织创建、管理和组织云资源产品,并进行权限控制
- [[IAM RBAC]]:基于角色的访问控制,通过最小权限原则管理 EKS 集群访问
- [[Cluster Autoscaler]]Kubernetes 组件,根据资源需求自动扩缩 Worker Node
- [[EMI]]ENI Multi-IPEKS 自定义网络方案,通过虚拟弹性网络接口为 Pod 分配额外 IP 地址,解决 VPC CIDR 限制
- [[ALB Ingress Controller]]AWS Load Balancer Controller负责管理 ALB Ingress 资源,实现 Kubernetes 服务的七层负载均衡
- [[CloudWatch Container Insights]]AWS 监控服务,收集容器级别的指标和日志并发布到 CloudWatch
- [[FluentBit]]:开源日志处理器,以 DaemonSet 方式部署于每个节点,负责收集容器日志
- [[AWS OpenTelemetry]]AWS 的可观测性数据收集方案,支持指标、日志和追踪的统一采集
## Key Entities
- [[Kubernetes]]entity容器编排框架EKS 的底层技术Google 开源CNCF 托管
- [[Amazon]]entityAWS/EKS 的提供商
## Connections
- [[Amazon EKS]] ← 基于 ← [[Kubernetes]]
- [[Terraform]] ← 用于 ← [[Infrastructure as Code]]
- [[AWS Service Catalog]] ← 用于 ← [[Infrastructure as Code]]
- [[ctp-topic-59-achieving-reliability-with-amazon-eks]] ← 相关 ← [[Amazon EKS]]
- [[ctp-topic-64-scaling-out-with-amazon-eks]] ← 相关 ← [[Cluster Autoscaler]]
- [[public-cloud-learning-sessions-eks-optimization-part-3-of-3-introduction-to-eks]] ← 相关 ← [[Amazon EKS]]
- [[ctp-topic-67-cloud-native-observability-using-opentelemetry]] ← 相关 ← [[AWS OpenTelemetry]]
## Contradictions
- 与 [[ctp-topic-59-achieving-reliability-with-amazon-eks]] 可能存在内容重叠:
- 冲突点:两篇均涉及 EKS 特性,但侧重点不同
- 当前观点Topic 70 侧重 IaC 部署方法和网络/监控机制
- 对方观点Topic 59 侧重 EKS 可靠性保证和最佳实践