AWS Containers

ECR

Elastic Container Registry.

ECS

Elastic Container Service.

EKS

通过Management Console创建EKS:

  1. 通过IAM给EKS和EC2创建service role EKS-Cluster permission: AmazonEKSClusterPolicy. EC2 permission:AmazonEKSWorkerNodePolicy,AmazonEC2ContainerRegistryReadOnly,AmazonEKS_CNI_Policy.
  2. 创建EKS cluster, 选择创建的EKS role作为集群服务角色.

Elastic Kubernetes Service.

https://github.com/weaveworks/eksctl

通过eksctl创建或删除cluster:

// 会自动更新~/.kube/config
$ eksctl create cluster \
--name my-cluster \
--region us-west-2 \
--with-oidc \
--ssh-access \
--ssh-public-key <your-key> \
--managed

$ kubectl get nodes -o wide

$ eksctl delete cluster --name my-cluster --region us-west-2

通过aws eks添加现有的cluster:

// 会自动更新~/.kube.config
$ aws eks update-kubeconfig --region us-west-2 --name my-cluster

$ kubectl cluster-info