EC2 생성
- Kubeflow를 설치하기 위한 EC2 생성
- 단순 설치용이라 AMI 크게 신경 안 써도 됨
Docker 설치
curl -s https://get.docker.com | sudo su
sudo usermod -aG docker $USER
Docker로 Ubuntu 환경 구성
docker pull ubuntu:latest
docker container run -it -p 127.0.0.1:8080:8080 ubuntu:latest
apt update
apt install git curl unzip tar make sudo vim wget -y
Git Clone
export KUBEFLOW_RELEASE_VERSION=v1.7.0
export AWS_RELEASE_VERSION=v1.7.0-aws-b1.0.3
git clone https://github.com/awslabs/kubeflow-manifests.git && cd kubeflow-manifests
git checkout ${AWS_RELEASE_VERSION}
git clone --branch ${KUBEFLOW_RELEASE_VERSION} https://github.com/kubeflow/manifests.git upstream
도구 설치
make install-tools
Error : python3.8이 설치가 안됨
add-apt-repository ppa:deadsnakes/ppa
Error : add-apt-repository가 없음
sudo apt-get install software-properties-common
add-apt-repository ppa:deadsnakes/ppa
# 다시 도구 설치
make install-tools
alias python=python3.8
aws configure --profile=kubeflow
export AWS_PROFILE=kubeflow
MFA 설정
aws sts get-session-token --profile ljs --duration-seconds 129600 --serial-number arn:aws:iam::xxxxxxx:mfa/DevOps3 --token-code xxxxxx
aws configure set aws_access_key_id 위 명령어의 output
aws configure set aws_secret_access_key 위 명령어의 output
aws configure set aws_session_token 위 명령어의 output
EKS 생성
export CLUSTER_NAME=$CLUSTER_NAME
export CLUSTER_REGION=$CLUSTER_REGION
eksctl create cluster \
--name ${CLUSTER_NAME} \
--version 1.25 \
--region ${CLUSTER_REGION} \
--nodegroup-name linux-nodes \
--node-type m5.xlarge \
--nodes 5 \
--nodes-min 5 \
--nodes-max 10 \
--managed \
--with-oidc