1. Argo CD 설치
cat <<EOT > argocd-values.yaml
global:
domain: argocd.$MyDomain
configs:
params:
server.insecure: true
controller:
metrics:
enabled: true
serviceMonitor:
enabled: true
server:
ingress:
enabled: true
controller: aws
ingressClassName: alb
hostname: "argocd.$MyDomain"
annotations:
alb.ingress.kubernetes.io/scheme: internet-facing
alb.ingress.kubernetes.io/target-type: ip
alb.ingress.kubernetes.io/backend-protocol: HTTP
alb.ingress.kubernetes.io/listen-ports: '[{"HTTPS":80}, {"HTTPS":443}]'
alb.ingress.kubernetes.io/certificate-arn: $CERT_ARN
alb.ingress.kubernetes.io/ssl-redirect: '443'
aws:
serviceType: ClusterIP
backendProtocolVersion: GRPC
metrics:
enabled: true
serviceMonitor:
enabled: true
repoServer:
metrics:
enabled: true
serviceMonitor:
enabled: true
applicationSet:
metrics:
enabled: true
serviceMonitor:
enabled: true
notifications:
metrics:
enabled: true
serviceMonitor:
enabled: true
EOT
kubectl create ns argocd
helm repo add argo https://argoproj.github.io/argo-helm
helm install argocd argo/argo-cd --version 6.7.11 -f argocd-values.yaml --namespace argocd
echo "https://argocd.$MyDomain"
# 최초 접속 암호 확인
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d ;echo
ID : admin
PW : c6cMnBXbXXsDj7Zq
2. App 배포 with Directory
3. GitOps (쿠버네티스 정보 vs Git 정보)
argoCD에서 수정해보기
- EKS - 쿠버네티스
kubectl edit deploy -n first myweb
kubectl describe deploy -n first myweb | grep 'label-test'
kubectl edit으로 직접 수정하기
kubectl edit deploy -n first myweb
- LIVE MANIFEST에서 추가한 Label은 업데이트 되지 않음
git 정보 수정 후 commit
3분 간격으로 Sync를 체크함
매뉴얼하게 싱크를 맞춘 모습
결론 : GitOps를 하려거든 git을 통해 변경관리를 하자