Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes. It follows the GitOps pattern of using git repositories as the source of truth for defining the desired application state. With ArgoCD, application deployments can be automated and updates to application can be made at the simple git commit events without the need of any complicated Continuous Integration and/or Deployment Pipelines.
after argocd installed, i tried integration with my private github repo. but I got error
FATA[0000] Argo CD server address unspecified
to fix this, I have configure endpoint of the argocd server with argocd cli command.
first, check your version of argocd to make sure argocd-cli has been installed
$ argocd version argocd: v2.5.5+fc3eaec BuildDate: 2022-12-16T16:34:36Z GitCommit: fc3eaec6f498ddbe49a5fa9d215a219191fba02f GitTreeState: clean GoVersion: go1.18.9 Compiler: gc Platform: linux/amd64
and then check your argocd-server endpoint with
$ k get svc argocd-server -n argocd NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE argocd-server LoadBalancer xxxxxx ${EXTERNAL-IP} 80:30581/TCP,443:31692/TCP xxxx
you can setup your argocd cli to external ip
$ argocd --insecure login ${EXTERNAL-IP}:443 Username: admin Password: Password: 'admin' logged in successfully Context '${EXTERNAL-IP}:443' updated
and now you can setup your argocd like
$ argocd repo add [email protected]:${ACCOUNTNAME}/${MANIFEST_ROOT_DIR}.git \ > --ssh-private-key-path /${HOME}/.ssh/id_rsa repository '[email protected]:${ACCOUNTNAME}/${MANIFEST_ROOT_DIR}.git' added
$ argocd app create hello-python \ --repo [email protected]::${ACCOUNTNAME}/${MANIFEST_ROOT_DIR}.git \ --path manifests --dest-server https://kubernetes.default.svc --dest-namespace ${APPNAMESPACE} \ --revision ${BRANCHNAME} --sync-policy automated --auto-prune --self-heal
thats it!