#ArgoCD
Declarative GitOps for Kubernetes.
#Installation
bash
1kubectl create namespace argocd
2kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
3
4# Get initial password
5kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d#Application Example
yaml
1apiVersion: argoproj.io/v1alpha1
2kind: Application
3metadata:
4 name: myapp
5 namespace: argocd
6spec:
7 project: default
8 source:
9 repoURL: https://github.com/org/repo.git
10 targetRevision: HEAD
11 path: kubernetes
12 destination:
13 server: https://kubernetes.default.svc
14 namespace: default
15 syncPolicy:
16 automated:
17 prune: true
18 selfHeal: true#CLI
bash
1argocd login localhost:8080
2argocd app list
3argocd app sync myapp
4argocd app history myapp[!TIP] Pro Tip: Enable auto-sync for hands-off deployments!