본문 바로가기

퍼블릭 클라우드

[kubernetes] EKS(Amazon Elastic Kubernetes Service) 구성

반응형

EKS(Amazon Elastic Kubernetes Service) 구성

eks 배포를 위한 필요한 도구들 설치

1. awscli 설치

curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
aws --version
$ aws --version
aws-cli/2.7.34 Python/3.9.11 Linux/5.15.0-46-generic exe/x86_64.ubuntu.20 prompt/off

2. aws-iam-authenticator 설치

curl -o aws-iam-authenticator https://s3.us-west-2.amazonaws.com/amazon-eks/1.21.2/2021-07-05/bin/linux/amd64/aws-iam-authenticator
chmod +x aws-iam-authenticator
sudo install aws-iam-authenticator /usr/local/bin
aws-iam-authenticator version
$ aws-iam-authenticator version
{"Version":"v0.5.0","Commit":"1cfe2a90f68381eacd7b6dcfa2bf689e76eb8b4b"}

3. eksctl 설치

curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/eksctl /usr/local/bin
eksctl version
$ eksctl version
0.112.0

4. kubectl 설치

curl -LO https://dl.k8s.io/release/v1.22.10/bin/linux/amd64/kubectl
sudo install kubectl /usr/local/bin
kubectl version
$ kubectl version --client --short
Client Version: v1.22.10

eks 설정 및 배포

IAM 계정 생성

AWS Management Console > IAM > 액세스 관리 > 사용자

aws 인증 구성

aws configure

aws 인증 확인

aws sts get-caller-identity

eks 배포

eksctl create cluster --name mycluster --region ap-northeast-2 --version 1.22 --instance-types t3.large --nodes 3

eks 삭제

eksctl delete cluster --name mycluster

 

728x90
반응형