Files
nexus/wiki/concepts/EKS-Custom-Networking.md

2.1 KiB
Raw Blame History

title, type, tags, sources, last_updated
title type tags sources last_updated
EKS Custom Networking concept
AWS
EKS
Kubernetes
Networking
VPC
IPAM
ctp-topic-39-implementing-eks-in-the-aws-lab-landing-zone
2026-04-28

Overview

EKS Custom Networking 是 AWS EKS 提供的一项功能,允许用户绕过默认的 VPC CNIAmazon VPC CNI plugin for Kubernetes行为自定义 Pod 的网络 IP 分配策略。这在 IP 地址受限或需要特殊网络配置的环境中尤为重要。

Definition

EKS 自定义网络Custom Networking通过以下机制实现

  • 通过 EKS 模块的自定义网络配置标志flag启用
  • 支持指定自定义的弹性网络接口ENI配置
  • 允许 Pod 使用独立于默认 VPC 子网的 IP 地址池

Use Case: AWS Lab Landing Zone

在 AWS Lab Landing Zone 环境中Micro Focus 网络的 IP 地址池有限,无法满足 EKS 集群中大量 Pod 的 IP 分配需求。通过自定义网络配置:

  1. 在独立私有子网(非主 VPC 子网)创建 EKS 集群
  2. 启用 EKS 模块的自定义网络标志
  3. EKS 使用指定的子网和 IP 范围分配 Pod 地址

Core Mechanism

EKS Module (Terraform)
  └── custom_networking_enabled = true
       ├── subnet_ids = [custom_subnet_ids]
       └── additional_eni_config = ...

Key Benefits

  • 突破 VPC CIDR 限制:在受限网络环境中仍可部署大规模 Pod
  • IP 地址灵活性:使用专用 IP 池,无需消耗 VPC 主网络地址
  • 网络隔离:独立子网提供额外的网络安全边界

Limitations

  • 需要 Terraform/Terragrunt 模块支持自定义网络标志
  • Atlantis 当前不支持 EKS 集群部署(需使用 Jenkins + Terragrunt
  • 容器安全加固需额外考虑网络隔离