728x90
목차
공식사이트
https://argo-cd.readthedocs.io/en/stable/getting_started/
설치 따라 하기
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가 설치되어 있지 않으면 먼저 설치하자!
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
'Infrastructure > Docker & Kubernetes' 카테고리의 다른 글
[kubernetes] CI&CD 2탄 - Spring-cloud를 활용해 만든 msa framework를 k8s에 배포하기 (0) | 2024.04.07 |
---|---|
[kubernetes] CI&CD 4탄 - Argocd Github 연동 및 APP 설정으로 k8s환경에 배포하기 (2) | 2024.04.06 |
[kubernetes] CI&CD 1탄 - MSA기반 Gitops 개념 및 프로세스 (0) | 2024.04.06 |
[kubernetes] docker, containerd https -> http 접근 설정하기 (1) | 2024.03.30 |
[kubernetes] helm install로 superset 완벽하게 설치하기 (2) | 2024.03.16 |