728x90

목차

     

    공식사이트

    https://argo-cd.readthedocs.io/en/stable/getting_started/

     

    Getting Started - Argo CD - Declarative GitOps CD for Kubernetes

    Getting Started Tip This guide assumes you have a grounding in the tools that Argo CD is based on. Please read understanding the basics to learn about these tools. Requirements Installed kubectl command-line tool. Have a kubeconfig file (default location i

    argo-cd.readthedocs.io

     

    설치 따라 하기

    kubectl create namespace argocd
    kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
    root@datapecker3:/opt/apps/woodpecker# kubectl create namespace argocd
    namespace/argocd created
    root@datapecker3:/opt/apps/woodpecker# kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
    customresourcedefinition.apiextensions.k8s.io/applications.argoproj.io created
    customresourcedefinition.apiextensions.k8s.io/applicationsets.argoproj.io created
    customresourcedefinition.apiextensions.k8s.io/appprojects.argoproj.io created
    serviceaccount/argocd-application-controller created
    serviceaccount/argocd-applicationset-controller created
    serviceaccount/argocd-dex-server created
    serviceaccount/argocd-notifications-controller created
    serviceaccount/argocd-redis created
    serviceaccount/argocd-repo-server created
    serviceaccount/argocd-server created
    role.rbac.authorization.k8s.io/argocd-application-controller created
    role.rbac.authorization.k8s.io/argocd-applicationset-controller created
    role.rbac.authorization.k8s.io/argocd-dex-server created
    role.rbac.authorization.k8s.io/argocd-notifications-controller created
    role.rbac.authorization.k8s.io/argocd-server created
    clusterrole.rbac.authorization.k8s.io/argocd-application-controller created
    clusterrole.rbac.authorization.k8s.io/argocd-applicationset-controller created
    clusterrole.rbac.authorization.k8s.io/argocd-server created
    rolebinding.rbac.authorization.k8s.io/argocd-application-controller created
    rolebinding.rbac.authorization.k8s.io/argocd-applicationset-controller created
    rolebinding.rbac.authorization.k8s.io/argocd-dex-server created
    rolebinding.rbac.authorization.k8s.io/argocd-notifications-controller created
    rolebinding.rbac.authorization.k8s.io/argocd-server created
    clusterrolebinding.rbac.authorization.k8s.io/argocd-application-controller created
    clusterrolebinding.rbac.authorization.k8s.io/argocd-applicationset-controller created
    clusterrolebinding.rbac.authorization.k8s.io/argocd-server created
    configmap/argocd-cm created
    configmap/argocd-cmd-params-cm created
    configmap/argocd-gpg-keys-cm created
    configmap/argocd-notifications-cm created
    configmap/argocd-rbac-cm created
    configmap/argocd-ssh-known-hosts-cm created
    configmap/argocd-tls-certs-cm created
    secret/argocd-notifications-secret created
    secret/argocd-secret created
    service/argocd-applicationset-controller created
    service/argocd-dex-server created
    service/argocd-metrics created
    service/argocd-notifications-controller-metrics created
    service/argocd-redis created
    service/argocd-repo-server created
    service/argocd-server created
    service/argocd-server-metrics created
    deployment.apps/argocd-applicationset-controller created
    deployment.apps/argocd-dex-server created
    deployment.apps/argocd-notifications-controller created
    deployment.apps/argocd-redis created
    deployment.apps/argocd-repo-server created
    deployment.apps/argocd-server created
    statefulset.apps/argocd-application-controller created
    networkpolicy.networking.k8s.io/argocd-application-controller-network-policy created
    networkpolicy.networking.k8s.io/argocd-applicationset-controller-network-policy created
    networkpolicy.networking.k8s.io/argocd-dex-server-network-policy created
    networkpolicy.networking.k8s.io/argocd-notifications-controller-network-policy created
    networkpolicy.networking.k8s.io/argocd-redis-network-policy created
    networkpolicy.networking.k8s.io/argocd-repo-server-network-policy created
    networkpolicy.networking.k8s.io/argocd-server-network-policy created

    위 명령어로 argocd namespace를 생성하고 install 한다.(이때 네임스페이스명은 꼭 argocd로 하는 것이 좋다.)

     

    brew install argocd
    root@datapecker3:/opt/apps/woodpecker# brew install argocd
    Command 'brew' not found, did you mean:
      command 'qbrew' from deb qbrew (0.4.1-8build1)
      command 'brec' from deb bplay (0.991-10build1)
    Try: apt install <deb name>

    brew 명령어로 argocd를 설치해야 한다. brew가 설치되어 있지 않으면 먼저 설치하자!

    https://jfbta.tistory.com/299

     

    [Linux] brew 설치 방법

    목차 brew 설치 sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" root@datapecker3:/home# sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)" Warning: Linuxbrew has been m

    jfbta.tistory.com

     

    brew 설치 후 명령을 실행하면 아래와 같이 다운로드가 진행될 것이다. 많이 기다려야 한다.

    user@datapecker3:/home$ brew install argocd
    ==> Auto-updating Homebrew...
    Adjust how often this is run with HOMEBREW_AUTO_UPDATE_SECS or disable with
    HOMEBREW_NO_AUTO_UPDATE. Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
    ==> Homebrew collects anonymous analytics.
    Read the analytics documentation (and how to opt-out) here:
      https://docs.brew.sh/Analytics
    No analytics have been recorded yet (nor will be during this `brew` run).
    
    ==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
      https://github.com/Homebrew/brew#donations
    
    ==> Downloading https://ghcr.io/v2/homebrew/core/argocd/manifests/2.10.5
    ############################################################################################## 100.0%
    ==> Fetching argocd
    ==> Downloading https://ghcr.io/v2/homebrew/core/argocd/blobs/sha256:1666d0373c210c786b532eb90bcfabd8
    #################################################

     

    네트워크 접속 설정

    Load Balancer or Port Forwarding

    kubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
    kubectl port-forward svc/argocd-server -n argocd 8080:443

    본인의 환경에 맞게 둘 중 하나를 실행시키자.

    필자는 포트포워딩으로 띄울 것이기 때문에 영구적으로 실행하고 로그를 남길 수 있게 문법을 작성하여 아래 명령어로 실행하였다.

    nohup kubectl port-forward --address=0.0.0.0 -n argocd svc/argocd-server 8080:443>> /opt/apps/kubernetes/logs/argocd.out 2>&1 &

     

    여기까지 진행하였다면 ${master host ip}:8080를 입력하여 argocd 사이트에 접속한다.

    admin 패스워드 확인하기

    argocd admin initial-password -n argocd
    user@datapecker3:/home$ argocd admin initial-password -n argocd
    TcTg2kgGdkhmdh7o
    
     This password must be only used for first time login. We strongly recommend you update the password using `argocd account update-password`.

    admin / TcTg2kgGdkhmdh7o 를 입력하여 로그인한다.

    728x90
    TOP