prerequisites
먼저 AWS Load Balancer Controller version set이 되어 있는지 점검
if [ ! -x ${LBC_VERSION} ]
then
tput setaf 2; echo '${LBC_VERSION} has been set.'
else
tput setaf 1;echo '${LBC_VERSION} has NOT been set.'
fi
IAM OIDC Provider 생성
eksctl utils associate-iam-oidc-provider \
--region ${AWS_REGION} \
--cluster tango-bmt-eks \
--approve
Create an IAM policy called
aws iam create-policy \
--policy-name AWSLoadBalancerControllerIAMPolicy \
--policy-document https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/main/docs/install/iam_policy.json
Create IAM role 과 ServiceAccount
eksctl create iamserviceaccount \
--cluster tango-bmt-eks \
--namespace kube-system \
--name aws-load-balancer-controller \
--attach-policy-arn arn:aws:iam::${ACCOUNT_ID}:policy/AWSLoadBalancerControllerIAMPolicy \
--override-existing-serviceaccounts \
--approve
Install the TargetGroupBinding CRDs
$ kubectl apply -k github.com/aws/eks-charts/stable/aws-load-balancer-controller/crds?ref=master
customresourcedefinition.apiextensions.k8s.io/targetgroupbindings.elbv2.k8s.aws created
$ kubectl get crd
NAME CREATED AT
eniconfigs.crd.k8s.amazonaws.com 2021-05-08T12:12:51Z
securitygrouppolicies.vpcresources.k8s.aws 2021-05-08T12:12:54Z
targetgroupbindings.elbv2.k8s.aws 2021-05-08T13:30:20Z
Deploy the Helm chart
helm repo add eks https://aws.github.io/eks-charts
helm upgrade -i aws-load-balancer-controller \
eks/aws-load-balancer-controller \
-n kube-system \
--set clusterName=bmt-tango-eks \
--set serviceAccount.create=false \
--set serviceAccount.name=aws-load-balancer-controller \
--set image.tag="${LBC_VERSION}"
kubectl -n kube-system rollout status deployment aws-load-balancer-controller
'TANGO > 기본 환경 구성' 카테고리의 다른 글
Amazon EFS CSI Driver (0) | 2021.05.08 |
---|---|
AMAZON EBS CSI DRIVER (1) | 2021.05.08 |
kube-ops-view 설치 (0) | 2021.05.08 |
ELB 서비스 Role 확인 (0) | 2021.05.08 |
Kubernetes Dashboard (0) | 2021.05.08 |