In the previous section, we explored how GitOps Workflow operates. To effectively implement this process, we need a tool that takes on the role of “GitOps Agent” to help automate and control application deployment from Git to the Kubernetes environment.
In this section, we will learn about Argo CD, a powerful application deployment tool designed specifically for Kubernetes environments. Argo CD not only helps automatically synchronize application state with configuration in Git but also provides a visual interface and efficient multi-cluster management capabilities.
Additionally, we will also become familiar with Helm Chart, a powerful tool that supports packaging and deploying applications. When combined with Argo CD, Helm helps simplify configuration management and enhance the efficiency of GitOps Workflow.
As its name suggests, Argo CD is a continuous deployment (CD) tool for Kubernetes. It helps synchronize application state with configuration in Git. Argo CD can “pull” updated source code from Git repository and deploy directly to resources in Kubernetes. This allows developers to manage both infrastructure configuration and application updates in a single system.
Argo CD handles the final steps in the GitOps process, ensuring that new configurations are deployed correctly to the Kubernetes cluster.
Key features of Argo CD:
Supports manual or automatic application deployment to Kubernetes cluster.
Automatically synchronizes application state with the current declared configuration version.
Provides web user interface (UI) and command line interface (CLI).
Can display deployment issues, detect and fix configuration drift.
Role-based access control (RBAC) supports multi-cluster management.
Supports single sign-on (SSO) with providers like GitLab, GitHub, Microsoft, OAuth2, OIDC, LinkedIn, LDAP and SAML 2.0.
Supports webhooks to trigger actions from GitLab, GitHub and Bitbucket.
Developer changes application source code, pushes new version of Kubernetes resource definitions to Git repo.
CI process is triggered, creates new container image and stores it in registry. CI process can commit or pull request the latest version of container image.
Pull request is reviewed and merged into main branch. Webhook is triggered or ArgoCD Sync mechanism to notify Argo CD of new changes.
Argo CD clones repository, compares application state in Git with current cluster state. It will apply necessary changes to the cluster.
Kubernetes uses controllers to coordinate changes, ensuring actual state reaches desired state.
Argo CD monitors progress and when cluster is ready, will report application is in “in sync” state.
Argo CD also works in reverse direction, monitoring changes on cluster and removing them if they don’t match configuration in Git.
Argo CD is the GitOps agent responsible for pulling source code from Git and deploying directly to Kubernetes resources, managing both infrastructure and application configuration simultaneously.
CRD (Custom Resource Definitions): Argo CD extends Kubernetes API through CRDs to define desired application state, based on Git or Helm repo.
CLI: Provides powerful command line, for example argocd app create helps create Application object without manually writing YAML.
UI Interface: Visual web interface supports application definition and deployment status monitoring in pod/container form, only supports creating declarative configuration – doesn’t directly intervene in cluster.
Multi-tenancy: Supports multiple teams working simultaneously with ability to limit repo access, namespace and separate RBAC configuration for each project.
Leverage existing tools: Argo CD is well compatible with tools like YAML, Helm chart, Kustomize,… helping reuse existing investments instead of replacing.
Helm is a tool that helps simplify deployment, scaling and management of applications on Kubernetes. Often described as a package manager for Kubernetes, Helm uses Helm charts, pre-configured templates to manage Kubernetes resources. This abstraction allows users to deploy applications with just a single Helm command, minimizing manual operations with YAML files and kubectl commands.
Helm chart is a blueprint that defines all necessary components of a Kubernetes application, including deployment, service and volume, in the form of easy-to-use templates that can be customized with input values. Thanks to reusability, these charts save time and reduce errors by providing consistent and repeatable configuration. As a result, Helm accelerates application development and deployment process, while ensuring consistency between different Kubernetes environments.
Helm makes managing applications on Kubernetes simpler, especially in deployment. Thanks to using pre-configured charts, development teams can deploy applications in correct and consistent ways across environments like dev, staging, or production. This reduces configuration drift and makes it easier to control complex applications with many interrelated parts.
Additionally, Helm supports version management and rollback, very important for ensuring application stability. If a new feature causes errors, Helm allows easy rollback to previous stable state. Packaging and distributing Kubernetes applications as Helm charts also increases collaboration and sharing capabilities between teams, thereby improving performance and operational efficiency.
Instead of having to write and manage many separate YAML files for Deployment, Service, ConfigMap, Ingress… Helm allows you to combine them all into a single Helm chart. Inside this chart, YAML files are written as reusable templates, while specific configuration (e.g., replica count, port, image name…) will be passed through the values.yaml file. When deploying to different environments like dev, staging or prod, you only need to change the corresponding values.yaml file, helping simplify the process, avoid manual errors and ensure consistency between environments.
Example: To deploy an application with configuration for staging environment, you just need to run the command helm install myapp ./mychart -f values-staging.yaml. Helm will automatically create all necessary Kubernetes resources from templates, so you don’t need to repeatedly write YAML manually for each environment.
Argo CD serves as the GitOps Agent, continuously monitoring the repository containing desired state representations (manifests, Helm charts, Kustomize…) and synchronizing them with the actual state of the Kubernetes cluster. When changes are detected in Git (e.g., updating image version in values.yaml file), Argo CD will automatically apply those changes to the cluster.
Helm is integrated as a flexible deployment tool, helping package application components into reusable charts. Instead of having to write many YAML files manually, Helm allows you to define template-style configuration, while specific values (replica, image, env…) will be managed separately in values.yaml files. This is particularly suitable for GitOps, because you can easily update configuration just by editing values.yaml files and committing to Git.
This combination brings many benefits:
Fully automate CI/CD process from Git to Cluster.
Standardize deployment between environments (dev, staging, prod).
Minimize manual errors, increase rollback capability when incidents occur.