Argo CD

ggorockee·2024년 11월 15일

devops

목록 보기
3/7
post-thumbnail

이제는 Argo CD를 올려보도록할게요. ArgoCD는 Kubernetes 클러스터에서 애플리케이션을 관리하고 배포하는 데 사용되는 GitOps 기반의 지속적 배포(Continuous Deployment, CD) 도구입니다. 이 도구는 선언적 접근 방식을 채택하여, 애플리케이션과 인프라의 상태를 Git 저장소에 정의된 대로 자동으로 동기화합니다.

머 여러가지 기능이 있지만 실무적이나 학습에서 대부분 차용하고 있는 툴이기도 하고 모든 배포가 Git을 통해 관리되므로 관리/자동화/확장성등이 뛰어납니다.

바로 설치부터 진행할게요. 여러가지 방법이 있지만 저는 Helm으로 설치하겠습니다. Helm이 편하기도하고 관리하기도 좋아서 그렇습니다.

repository부터 추가하도록 할게요

helm repo add argo https://argoproj.github.io/argo-helm
helm repo update
helm show values argo/argo-cd --version 7.5.2 > values.origin.yaml
cp values.origin.yaml values.yaml

여기에서 values.yaml

global:
  domain: argocd.dev.xxxx.com # domain

configs:
  params:
    server.insecure: true

이렇게 수정해줍니다.

사뿐히 설치 명령어 날려줍시다.

helm upgrade --install argocd --namespace argocd --create-namespace -f values.yaml --version 7.5.2 argo/argo-cd

# Release "argocd" does not exist. Installing it now.
# NAME: argocd
# LAST DEPLOYED: Fri Nov 15 13:32:06 2024
# NAMESPACE: argocd
# STATUS: deployed
# REVISION: 1
# TEST SUITE: None
# NOTES:
# In order to access the server UI you have the following options:

# 1. kubectl port-forward service/argocd-server -n argocd 8080:443

#     and then open the browser on http://localhost:8080 and accept the certificate

# 2. enable ingress in the values file `server.ingress.enabled` and either
#       - Add the annotation for ssl passthrough: https://argo-cd.readthedocs.io/en/stable/operator-manual/ingress/#option-1-ssl-passthrough
#       - Set the `configs.params."server.insecure"` in the values file and terminate SSL at your ingress: https://argo-cd.readthedocs.io/en/stable/operator-manual/ingress/#option-2-multiple-ingress-objects-and-hosts


# After reaching the UI the first time you can login with username: admin and the random password generated during the installation. You can find the password by running:

# kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d

마지막 명령어에 살짝만 추가해서 메모장에 기록해두도록합시다. 까먹어두 됩니다.

kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d && echo
helm status argocd -n argocd 
kubectl get all -n argocd 
# NAME                                                    READY   STATUS    RESTARTS   AGE
# pod/argocd-application-controller-0                     1/1     Running   0          9m20s
# pod/argocd-applicationset-controller-74ffcd744c-8k7w8   1/1     Running   0          9m20s
# pod/argocd-dex-server-5c4d68dfb-bzb6b                   1/1     Running   0          9m20s
# pod/argocd-notifications-controller-75bd5b6487-t98qx    1/1     Running   0          9m20s
# pod/argocd-redis-7ddb8856c-t2ld8                        1/1     Running   0          9m20s
# pod/argocd-repo-server-f58d6b76b-9ldqn                  1/1     Running   0          9m20s
# pod/argocd-server-66d6d844bc-xppr9                      1/1     Running   0          9m20s

# NAME                                       TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)             AGE
# service/argocd-applicationset-controller   ClusterIP   10.110.125.255   <none>        7000/TCP            9m21s
# service/argocd-dex-server                  ClusterIP   10.110.82.68     <none>        5556/TCP,5557/TCP   9m21s
# service/argocd-redis                       ClusterIP   10.103.49.168    <none>        6379/TCP            9m21s
# service/argocd-repo-server                 ClusterIP   10.103.236.109   <none>        8081/TCP            9m21s
# service/argocd-server                      ClusterIP   10.107.37.48     <none>        80/TCP,443/TCP      9m21s

# NAME                                               READY   UP-TO-DATE   AVAILABLE   AGE
# deployment.apps/argocd-applicationset-controller   1/1     1            1           9m21s
# deployment.apps/argocd-dex-server                  1/1     1            1           9m21s
# deployment.apps/argocd-notifications-controller    1/1     1            1           9m21s
# deployment.apps/argocd-redis                       1/1     1            1           9m21s
# deployment.apps/argocd-repo-server                 1/1     1            1           9m21s
# deployment.apps/argocd-server                      1/1     1            1           9m21s

# NAME                                                          DESIRED   CURRENT   READY   AGE
# replicaset.apps/argocd-applicationset-controller-74ffcd744c   1         1         1       9m21s
# replicaset.apps/argocd-dex-server-5c4d68dfb                   1         1         1       9m21s
# replicaset.apps/argocd-notifications-controller-75bd5b6487    1         1         1       9m21s
# replicaset.apps/argocd-redis-7ddb8856c                        1         1         1       9m21s
# replicaset.apps/argocd-repo-server-f58d6b76b                  1         1         1       9m21s
# replicaset.apps/argocd-server-66d6d844bc                      1         1         1       9m21s

# NAME                                             READY   AGE
# statefulset.apps/argocd-application-controller   1/1     9m21s

argocd가 정상적으로 설치가 되었네요~. 웹 UI는 Istio로 설치하도록하겠습니다.

0개의 댓글