# Argo CD

![](https://415484505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LxtoAXZwwOc4XGto8vb%2Fuploads%2FPuel4tSlASQ4uZICYbGj%2FScreenshot%202022-04-05%20at%2009.44.19.png?alt=media\&token=c1083104-8773-497e-ab83-ec4383b1c77f)

![](https://415484505-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LxtoAXZwwOc4XGto8vb%2Fuploads%2FxpGRxK9Ihl5oKNXEdpRv%2FScreenshot%202022-04-05%20at%2009.47.26.png?alt=media\&token=79032e08-f056-4783-8ed8-ba8b5da7f16e)

## Install

```
// check preconditions. There should be argocd namespace
kubectl get namespaces

// if absent, create it
kubectl create namespace argocd

// install ArgoCD to the cluster
k apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

// check argocd was installed
kubectl get pods -n argocd

// clean up setup
kubectl delete -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
```

```
// install argoCD CLI
brew install argocd
```

:thumbsup:[Useful article about installation](https://faun.pub/setup-argocd-bootstrap-resources-in-kubernetes-9ef40e16ca6a). :thumbsup:[Official docs](https://argo-cd.readthedocs.io/en/stable/getting_started/#4-login-using-the-cli)

```
// expose ArgoCD UI for local experiments
kubectl port-forward svc/argocd-server -n argocd 8080:443 &

// The user is admin
// get initial password to login to ArgoCD UI
kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echo

// more fresh way to retrieve a password
argocd admin initial-password -n argocd

// how to changet the password
argocd account update-password
```

### GitOps (+Helm)

How does Argo CD know our application is a Helm chart? It looks for a `Chart.yaml` file under `path` in the Git repository

{% hint style="info" %}
Argo CD will not use `helm install` to install charts. It will render the chart with `helm template` and then apply the output with `kubectl`. This means we can’t run `helm list` on a local machine to get all installed releases
{% endhint %}
