> For the complete documentation index, see [llms.txt](https://devops-maestro.gitbook.io/cicd-pipeline-using-jenkins-and-argocd/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devops-maestro.gitbook.io/cicd-pipeline-using-jenkins-and-argocd/install-argocd.md).

# Install ArgoCD

To install ArgoCD and ArgoCD CLI, use the following list of commands

```sh
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

# Install ArgoCD CLI
curl -sSL -o argocd-linux-amd64 https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
sudo install -m 555 argocd-linux-amd64 /usr/local/bin/argocd
rm argocd-linux-amd64
```

To verify whether ArgoCD is up and running

```sh
kubectl get pods -n argocd
```

<figure><img src="https://3157512683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSdKCeOdDbFafu1TTNFV5%2Fuploads%2FU9fhoWYJilDR5HMIPuhE%2Fimage.png?alt=media&amp;token=f71829bc-b934-4990-a5b6-825bac31dccd" alt=""><figcaption></figcaption></figure>

To expose the ArgoCD server, edit the service manifest of argo-cd server and change the ClusterIP to NodePort. To get a list of ArgoCD services:

```sh
kubectl get svc -n argocd
```

To edit the argocd-server service manifest

```
kubectl edit svc argocd-server -n argocd
```

Change the type from ClusterIP to NodePort

<figure><img src="https://3157512683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSdKCeOdDbFafu1TTNFV5%2Fuploads%2FB0C6gkpYiUDDO2M1Vuqr%2Fimage.png?alt=media&amp;token=9588af58-a3fe-4221-b55c-5ca673e52da9" alt=""><figcaption></figcaption></figure>

Expose the service

```sh
minikube service argocd-server -n argocd
```

<figure><img src="https://3157512683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSdKCeOdDbFafu1TTNFV5%2Fuploads%2FU5MI7OiN8qsXIdyPuwlv%2Fimage.png?alt=media&amp;token=41e460e2-5c14-412f-ad45-5f9fb22d7be4" alt=""><figcaption></figcaption></figure>

In order to use ArgoCD CLI, a password is required so to extract the password from the secret file and decode

```sh
kubectl edit secret argocd-initial-admin-secret -n argocd
echo <password> | base64 --decode
```

Login using the ArgoCD CLI

```sh
argocd login <ip address of argocd server>:<port>
# Username: admin
# Password: Password extracted from argocd-initial-admin-secret file
```

<figure><img src="https://3157512683-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSdKCeOdDbFafu1TTNFV5%2Fuploads%2FbWP2IvGTuBY8fid4Ljv6%2Fimage.png?alt=media&amp;token=5096f99b-f0cc-41c3-a85c-3b215b2fd461" alt=""><figcaption></figcaption></figure>
