ArgoCd - Kubernetes

남현우·2023년 9월 7일
0

ArgoCD설치

1.네임스페이스생성

	k create namespace argocd
  1. ArgoCd 설치
k apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/ha/install.yaml```
  1. ClusterIP -> LoadBalancer로 변경
k patch svc argocd-server -n argocd -p '{"spec": {"type": "LoadBalancer"}}'
  1. secret에 있는 초기 패스워드 확인
k get secret -n argocd argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d && echo
  1. 사이트 접속
    admin - 위에서 얻은 패스워드 - 초기패스워드 변경

  2. CLI 로그인

argocd login --insecure 192.168.50.10:31394
  1. Repositories 등록
    -> Setting + CONNECT REPO
    VIA SSH
    Name : argo
    Project : default
    Repository URL : git@github.com:Namppo/argocd.git
    SSH private key data : 생성해서 입력
    -----BEGIN OPENSSH PRIVATE KEY-----
    -----END OPENSSH PRIVATE KEY-----

github에 pub 키 입력, argocd에 private키 입력

  1. Applications 생성
    Applications +
    Application Name : nginx
    Project Name : default
    SYNC POLICY : Manual

    SOURCE
    Repository URL : git@github.com:Namppo/argocd.git
    Revision : master
    Path : nginx

    DESTINATION
    Cluster URL : https://kubernetes.default.svc
    Namespace : nginx

참고사이트
https://happygram.tistory.com/entry/ArgoCD-Repositories-%EC%84%A4%EC%A0%95%ED%95%98%EA%B8%B0
https://devocean.sk.com/blog/techBoardDetail.do?ID=164752&boardType=techBlog
https://transferhwang.tistory.com/160

profile
노력하는 프로그래머

0개의 댓글