Getting Started with Platform9’s Hosted ArgoCD
Prerequisites
References
Documentation
[ArgoCD Docs: Operator Manual Declarative Setup](https://argo-cd.readthedocs.io/en/stable/operator-manual/declarative-setup)
Videos
- TechWorld with Nana: ArgoCD Tutorial for Beginners | GitOps CD for Kubernetes
Install the argocd CLI and connect it to Platform9 ArgoCD
1
2
3
4
brew install argocd
PF9_INSTANCE=my-instance.platform9.play
argocd login ${PF9_INSTANCE} --sso --grpc-web-root-path argocd
Adding Repository Credentials
- Create a dedicated SSH Key for ArgoCD
1
ssh-keygen -t ecdsa-sha2-nistp256 -f ~/.ssh/argocd_id_ecdsa
Add Key to GitHub as an authorized SSH Key.
Add Private SSH Repository to ArgoCD:
1
argocd repo add [email protected]:estenrye/cd-homelab.git --ssh-private-key-path ~/.ssh/argocd_id_ecdsa
Adding a new project for managing ArgoCD configuration
ArgoCD can be managed declaritively, but we first need to tell it where to find its configuration. To do that, we first create a project that allows us to deploy to the argocd namespace in the in-cluster. The main reason we are separating this into its own project is so we can control who has permissions to deploy apps to the cluster.
1
2
3
4
5
6
# Create the Project
argocd proj create argocd --description 'Project for Declaratively Managing ArgoCD'
# Add Source and Destinations
argocd proj add-source argocd '[email protected]:estenrye/cd-homelab.git'
argocd proj add-destination argocd in-cluster argocd