Skip to content

Commit

Permalink
'project02' image exchange
Browse files Browse the repository at this point in the history
  • Loading branch information
dongdorrong committed Jan 16, 2023
1 parent c1dc4c0 commit a3ad76c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion project02/practice/container/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM nginx:alpine

RUN echo "My name is dongdorrong-nginx" > /usr/share/nginx/html/index.html ; \
RUN echo "Welcome to dongdorrong-nginx" > /usr/share/nginx/html/index.html ; \
apk update
6 changes: 3 additions & 3 deletions project02/practice/setup_alb_controller/run.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash

aws eks update-kubeconfig --region ap-northeast-2 --name dongdorrong-eks-pxd24W1T
aws eks update-kubeconfig --region ap-northeast-2 --name dongdorrong-eks-QZEww6vy

curl -o iam_policy.json https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.4/docs/install/iam_policy.json

aws iam create-policy --policy-name AWSLoadBalancerControllerIAMPolicy --policy-document file://iam_policy.json

eksctl create iamserviceaccount --cluster=dongdorrong-eks-pxd24W1T --namespace=kube-system --name=aws-load-balancer-controller --role-name "AmazonEKSLoadBalancerControllerRole" --attach-policy-arn=arn:aws:iam::252462902626:policy/AWSLoadBalancerControllerIAMPolicy --approve
eksctl create iamserviceaccount --cluster=dongdorrong-eks-QZEww6vy --namespace=kube-system --name=aws-load-balancer-controller --role-name "AmazonEKSLoadBalancerControllerRole" --attach-policy-arn=arn:aws:iam::252462902626:policy/AWSLoadBalancerControllerIAMPolicy --approve

helm install aws-load-balancer-controller eks/aws-load-balancer-controller -n kube-system --set clusterName=dongdorrong-eks-pxd24W1T --set serviceAccount.create=false --set serviceAccount.name=aws-load-balancer-controller
helm install aws-load-balancer-controller eks/aws-load-balancer-controller -n kube-system --set clusterName=dongdorrong-eks-QZEww6vy --set serviceAccount.create=false --set serviceAccount.name=aws-load-balancer-controller

kubectl get deployment -n kube-system aws-load-balancer-controller
6 changes: 3 additions & 3 deletions project02/practice/terraform/security-groups.tf
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ resource "aws_security_group" "node_group_two" {
protocol = "tcp"

security_groups = [
data.aws_security_group.eks_alb_sg.id,
data.aws_security_group.argocd_alb_sg.id
data.aws_security_group.eks_alb_sg.id,
data.aws_security_group.argocd_alb_sg.id
]
}

Expand All @@ -51,6 +51,6 @@ data "aws_security_group" "eks_alb_sg" {
data "aws_security_group" "argocd_alb_sg" {
filter {
name = "tag:Name"
values = [ "k8s-elb-aa22fec6ee8544a41b70a571ff3591ff" ]
values = [ "k8s-elb-a234f2329747143a280912f4ea757e6a" ]
}
}

0 comments on commit a3ad76c

Please sign in to comment.