brunch

EKS 2탄-2. EKS cluster 생성-2/11

실습 2탄 = 2/11

by Master Seo

# eks 최신 버전으로 설치하도록 하자

# 최신버전은 콘솔에서 확인 가능하다.




<1> aws-com2 EC2에서 EKS cluster 생성



#

aws-com2 명령서버

클러스터 이름 eks-demo2

노드 3개를 2개로 변경해 생성



1


export AWS_REGION=ap-northeast-2

echo ${AWS_REGION}



cat << EOF > eks-demo-cluster.yaml


apiVersion: eksctl.io/v1alpha5

kind: ClusterConfig


metadata:

name: eks-demo2 # 생성할 EKS 클러스터명

region: ${AWS_REGION} # 클러스터를 생성할 리젼

version: "1.33"


vpc:

cidr: "192.168.0.0/16" # 클러스터에서 사용할 VPC의 CIDR


managedNodeGroups:

- name: node-group # 클러스터의 노드 그룹명

instanceType: m5.large # 클러스터 워커 노드의 인스턴스 타입

desiredCapacity: 2 # 클러스터 워커 노드의 갯수

volumeSize: 20 # 클러스터 워커 노드의 EBS 용량 (단위: GiB)

iam:

withAddonPolicies:

imageBuilder: true # AWS ECR에 대한 권한 추가

albIngress: true # albIngress에 대한 권한 추가

cloudWatch: true # cloudWatch에 대한 권한 추가

autoScaler: true # auto scaling에 대한 권한 추가


cloudWatch:

clusterLogging:

enableTypes: ["*"]

EOF


eksctl create cluster -f eks-demo-cluster.yaml






(13분 소요 됨)


100 13분.png


2

타이머

https://vclock.kr/timer/#countdown=00:10:00&enabled=0&seconds=0&sound=xylophone&loop=1


3

2024-12-18 21:10:46 [!] recommended policies were found for "vpc-cni" addon, but since OIDC is disabled on the cluster, eksctl cannot configure the requested permissions; the recommended way to provide IAM permissions for "vpc-cni" addon is via pod identity associations; after addon creation is completed, add all recommended policies to the config file, under `addon.PodIdentityAssociations`, and run `eksctl update addon`


2024-12-18 21:10:46 [!] "vpc-cni" 애드온에 대한 권장 정책이 발견되었지만 클러스터에서 OIDC가 비활성화되었으므로 eksctl이 요청된 권한을 구성할 수 없습니다. "vpc-cni" 애드온에 대한 IAM 권한을 제공하는 권장 방법은 포드 ID 연결을 이용하는 것입니다. 애드온 생성이 완료되면 'addon.PodIdentityAssociations' 아래 구성 파일에 모든 권장 정책을 추가하고 'eksctl update addon'을 실행하세요.



2024-12-18 21:15:07 [✔] EKS cluster "eks-demo2" in "ap-northeast-2" region is ready



4

노드 확인 ?


kubectl get nodes


[root@ip-172-31-17-36 ~]# kubectl get nodes

NAME STATUS ROLES AGE VERSION

ip-192-168-6-249.ap-northeast-2.comil Ready <none> 2m3s v1.31.3-eks-59bf375

ip-192-168-61-231.ap-northeast-2.coeal Ready <none> 2m1s v1.31.3-eks-59bf375

ip-192-168-85-95.ap-northeast-2.com Ready <none> 2m3s v1.31.3-eks-59bf375


50 command.png





echo 'alias k=kubectl' >> /etc/profile

echo 'complete -F __start_kubectl k' >> /etc/profile







5

VPC 확인? 192.168.0.0/16

subnet 확인?





6

# 참고 - AWS EKS 실습 2탄 전체 보기



https://brunch.co.kr/@topasvga/1882



7

https://brunch.co.kr/@topasvga/1679



8

다음은


https://brunch.co.kr/@topasvga/1694



keyword
매거진의 이전글EKS 2탄-1. aws-com2 EC2생성-1/11