본문 바로가기

DevOps/ArgoCD

[ArgoCD]Install ArgoCD from url with Ingress

Install ArgoCD from url with Ingress

Install argcd

# Create namespace 
kubectl create namespace argocd

# Install argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

# Delete argocd
kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

Set Ingress

Argocd Ingress Config 참고
Ingress Configuration - Argo CD - Declarative GitOps CD for Kubernetes
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: argocd-server-ingress
  namespace: argocd
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
    kubernetes.io/ingress.class: nginx
    kubernetes.io/tls-acme: "true"
    nginx.ingress.kubernetes.io/ssl-passthrough: "true"
    # If you encounter a redirect loop or are getting a 307 response code
    # then you need to force the nginx ingress to connect to the backend using HTTPS.
    #
    nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
  rules:
  - host: argocd.ta.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: argocd-server
            port:
              name: https
  tls:
  - hosts:
    - argocd.ta.com
    secretName: argocd-secret # do not change, this is provided by Argo CD

Change Password

get password

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

QvyEXaPHnpqFbfYw

owpYHyBSgWCYHYLe
10.106.199.25

Change password & Delete initail seceret

## change
k -n argocd  exec -it argocd-server-859b4b5578-f7jrq -- /bin/bash

argocd login 10.104.41.32(argocd-server clusterIP)
argocd account update-password

## delete
k -n argocd delete secrets argocd-initial-admin-secret

Connect git repo using https

연결한 Ingress로 접속 후 진행한다.

Add New App

Sync policy option

  • Prune Resources: 변경 사항에 따라 리소스를 업데이터할 때, 기존의 리소스를 삭제하고 새로운 리소스를 생성합니다. Job 리소스처럼 매번 새로운 작업을 실행해야 하는 경우 이 옵션을 사용합니다.
  • Self Heal: 해당 옵션을 활성화 시키면 ArgoCD가 지속적으로 git repository의 설정값과 운영 환경의 값의 싱크를 맞출려고 합니다. 기본적으로 5초마다 계속해서 sync를 시도하게 됩니다. (default timeout)

'DevOps > ArgoCD' 카테고리의 다른 글

[ArgoCD]Install ArgoCD from Helm chart  (0) 2022.06.23
[ArgoCD]ArgoCD Architecture  (0) 2022.06.09