1. EKS Cluster
2. Install ArgoCD
curl -sSL -o /usr/bin/argocd https://github.com/argoproj/argo-cd/releases/download/v1.8.3/argocd-linux-amd64
chmod +x /usr/bin/argocd
argocd version
- Run the following command to create a namespace. Name it argocd.
kubectl create namespace argocd
- Run the following command to deploy Argo CD.
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v1.8.3/manifests/install.yaml
Note:
The Argo CD community also provides an HA deployment method by running the command kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/v1.8.3/manifests/ha/install.yaml. It’s for deployment in production.
- Run the following command to set the Service type to NodePort.
kubectl patch svc argocd-server -p '{"spec": {"type": "LoadBalancer"}}' -n argocd
- Get service using following command
kubectl get svc -n argocd
- Trigger LoadBalancer DNS in UI
- Provide Username as
admin
Password as PodID
- Reset Password in UI or else with following command
## Login with admin with default password
argocd login <Loadbalancer-of-argocd-service> --username admin --password <POD ID>
e.g:
argocd login a973d9a400db742188192fcad673eaa0-1823655890.us-east-1.elb.amazonaws.com --username admin --password argocd-server-67f58479-j8wgp
## update admin password
argocd account update-password --account admin --current-password argocd-server-67f58479-j8wgp --new-password password
We surely can create an application through the Web UI, but let’s use the CLI tool here so that you can better understand Argo CD by using the commands below.
- Run the following command to create an application
argocd app create nginx-application \
--repo https://github.com/Naresh240/argocd-example-application.git \
--path kubernetes \
--dest-server https://kubernetes.default.svc \
--dest-namespace default
- After a while, you can view the service created shown on the Argo CD web page
Note:
It will be in out of sync for the first time, so we need to click on SYNC
option
- Click it to see its details. You can also click the icon in the upper right corner to view its topology diagram
argocd app list
argocd app delete nginx-application