AWS에서 Elastic Kubernetes Service (EKS) 생성하기
- EKS Cluster에서 Master Node Identity and Access Management (IAM) Role 생성
- EKS Worker Node IAM Role 생성
- EKS Cluster 생성 (K8S Master Node 생성)
- 생성된 Master Node 에 Worker Node 붙이기
- Kubectl로 생성된 클러스터에 접속하기 위한 세팅
1. EKS Cluster에서 Master Node Identity and Access Management (IAM) Role 생성
2. EKS Worker Node IAM Role 생성
- AmazonEKS_CNI_Policy
- AmazonEKSWorkerNodePolicy
- AmazonEC2ContainerRegistryReadOnly
이름을 정하고 (필자는 WorkerNode 라고 지음) 3가지 Policy가 추가 된 것을 확인 한 후 역할 생성
3. EKS Cluster 생성 (K8S Master Node 생성)
4. 생성된 Master Node 에 Worker Node 붙이기
5. Kubectl로 생성된 클러스터에 접속하기 위한 세팅
kubectl이 설치된 컴퓨터에서 다음과 같은 명령어 실행
sudo apt-get install awscli
aws configure
Access Key Id: {Access Key Id}
Secret Access Key: {Secret Access Key}
region name: ap-northeast-2
format: json
aws eks --region {region} update-kubeconfig --name {cluster_name}