실습 2탄 = 7/11
1
API 서버
web, cli , cd/cd api 제공
2
레파지토리 서버
3
애플리케이션 컨트롤러 ?
제어, 모니터링하는 쿠버네티스 컨트롤러
4
kubens
[root@demo2 ~]# kubens
amazon-cloudwatch
default
kube-node-lease
kube-public
kube-system
1
watch -d kubectl get ns,deploy,rs,svc,pods
2
# 네임스페이스 생성 ?
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
kubens argocd
3
ArgoCD CLI 설치 ?
VERSION=$(curl --silent "https://api.github.com/repos/argoproj/argo-cd/releases/latest" | grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/')
sudo curl --silent --location -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/download/$VERSION/argocd-linux-amd64
sudo chmod +x /usr/local/bin/argocd
4
테스트를 위해 ArgoCD 외부에서 접속 가능하도록 변경
# Load Balancer 이용 ?
kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
service/argocd-server patched
5
# LB생성 확인
export ARGOCD_SERVER=`kubectl get svc argocd-server -n argocd -o json | jq --raw-output .status.loadBalancer.ingress[0].hostname`
echo $ARGOCD_SERVER
6
# 암호는 ArgoCD API 서버의 포드 이름?
ARGO_PWD=`kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d`
echo $ARGO_PWD
7
# admin으로 로그인
argocd login $ARGOCD_SERVER --username admin --password $ARGO_PWD --insecure
'admin:login' logged in successfully
Context 'a110cd5xxxxxxxd05-1965148026.us-west-2.elb.amazonaws.com' updated
8
# 웹으로 접속 확인?
echo $ARGOCD_SERVER
a110cd5059da7xxxxx05-1965148026.us-west-2.elb.amazonaws.com
고급 - 안전하지 않음으로 이동.
<10> AWS EKS 실습 2탄
https://brunch.co.kr/@topasvga/1882
https://brunch.co.kr/@topasvga/1679
https://brunch.co.kr/@topasvga/1699