EKS Cluster에 Load Balancer Controller 설치한 후에 ALB 생성해보도록 하겠습니다.
- EKS OIDC Provider
CLUSTER_NAME="ydy-eks"
eksctl utils associate-iam-oidc-provider --cluster ${CLUSTER_NAME} --approve
- IAM Policy / Role 생성
curl -O https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.7/docs/install/iam_policy.json
aws iam create-policy \
--policy-name AWSLoadBalancerControllerIAMPolicy-eks-ydy \
--policy-document file://iam_policy.json
POLICY_ARN=$(aws iam list-policies --query 'Policies[?PolicyName==`AWSLoadBalancerControllerIAMPolicy-eks-ydy`].Arn' --output text)
ROLE_NAME="AmazonEKSLoadBalancerControllerRole-eks-ydy"
eksctl create iamserviceaccount \
--cluster ${CLUSTER_NAME} \
--namespace=kube-system \
--name=aws-load-balancer-controller \
--role-name ${ROLE_NAME} \
--attach-policy-arn=${POLICY_ARN} \
--approve
- helm 설치
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
- helm chart 추가
helm chart 추가
helm repo add eks https://aws.github.io/eks-charts
helm repo update
helm aws-load-balancer-controller 설치
helm upgrade --install aws-load-balancer-controller eks/aws-load-balancer-controller \
-n kube-system \
--set clusterName=${CLUSTER_NAME} \
--set serviceAccount.create=false \
--set serviceAccount.name=aws-load-balancer-controller \
--set region=ap-northeast-2 \
--set vpcId=my-vpc-ID
helm aws-load-balancer-controller 삭제 명령어
helm delete aws-load-balancer-controller -n kube-system
'AWS' 카테고리의 다른 글
[AWS] EKS - Horizontal Pod AutoScaler ( HPA ) 설정 (8) | 2024.09.29 |
---|---|
[AWS] EKS - Nginx Ingress Controller 설치 및 NLB 생성 (0) | 2024.09.29 |
[AWS] EKS Cluster 생성 (0) | 2024.09.21 |
[AWS] S3, Athena, Lambda - 최근 액세스 날짜 기준 이후의 객체 삭제 (0) | 2024.09.21 |
[AWS] S3 - Cross Account Access (3) | 2024.09.21 |