Member-only story
How To Set Up Argo CD With Terraform To Implement Pure GitOps
Declarative continuous deployment for your Kubernetes workloads
Argo CD is an extremely popular declarative, GitOps-based continuous delivery tool. It is an open source tool and part of the Cloud Native Computing Foundation (CNCF).
It is effortless to install and set up, and it offers various features and a jazzy UI to manage all your application requirements. In addition, the tool is Kubernetes-aware and helps you implement GitOps by continuously syncing your Kubernetes resource manifests from Git to your Kubernetes cluster.
Why Argo CD?
It allows teams to achieve GitOps, which has the following principles:
- Git is the single source of truth.
- Git is the single place to operate all environments, and all configurations are code.
- All changes are observable/verifiable.
How Argo CD Works
Apart from the plain old Kubernetes manifest YAML files, Argo CD supports several other ways of defining Kubernetes manifests:
- helm charts
- kustomize
- ksonnet
- jsonnet files
- Simple YAML/JSON manifests
- Other custom config management tools via plugins
You can define applications in Argo CD that contain a source and a target. The source describes the Git repository and the location of the manifests/helm charts/kustomize files and applies them in the specified target environments. You can track changes to a particular branch, tag, or watch a specific version in your Git repository. There are also other tracking strategies available.
Argo CD provides a web-based UI and a CLI for interacting with it. It can also report on the application status using sync hooks and app actions, so if there are any changes done in the cluster outside GitOps, Argo CD can alert your team in, say, a Slack channel.
The following image describes the Argo CD architecture in detail: