What is Kubernetes?
Kubernetes is one of the world’s most widely used open source platforms and the de-facto standard for container orchestration.
In the past decade, containers became a common method to package software and deploy them in a repeatable, consistent way across multiple environments. Kubernetes helps manage containers at a large scale, organizing them into clusters and pods, and managing their life cycles. Kubernetes is commonly used to deploy and manage microservice applications.
Increasingly, organizations are transitioning to using Kubernetes in production. To effectively manage CI/CD in a Kubernetes environment, a new approach has evolved known as GitOps. GitOps means that every aspect of the CI/CD pipeline is represented as code, committed to a Git repository, and regenerated automatically on any change to this code.
This is part of our series of articles about Argo CD.
What is Argo?
Argo is an open source project which is in incubation status in the Cloud Native Computing Foundation (CNCF) and is used by organizations like Google, Red Hat, NVIDIA, Adobe, and powers the Codefresh Software Delivery Platform. It helps manage and automate software delivery in a cloud native environment.
Argo is Kubernetes-native, making it much easier for developers to deploy and release applications, without having to integrate other tools and adapt their workflows to Kubernetes. Argo enables teams to implement a GitOps approach for their CI/CD pipelines in Kubernetes – it allows teams to build entire pipelines using simple declarative configuration.
Argo manages the full lifecycle of cloud-native applications, from development and testing to deployment, release, and ongoing operations. Argo makes rapid release and rollback effortless, and promotes consistency and stability.
How does Argo work?
Argo is a family of tools that enable deployments, workflows, events and progressive delivery for Kubernetes native workloads.
Argo helps you introduce containers to your developers and operations teams when adopting a Kubernetes-based development and deployment strategy for your distributed applications.
Argo offers several components that allow developers to specify the tasks required to ship and distribute their services. Notable Argo projects include:
- Argo CD—a continuous deployment tool for GitOps-based projects in Kubernetes. The configuration logic resides in Git, allowing you to incorporate code from your Git repository into your existing development and review workflows. Argo CD does not directly handle CI but integrates with CI systems.
- Argo Workflows—a containerized workflow engine that orchestrates parallel Kubernetes jobs.
- Argo Rollouts—a controller for progressive delivery in Kubernetes. It lets you implement rolling updates with a progressive deployment technique for various deployment types, including blue-green and canary deployments.
- Argo Events—an automation framework for event-based workflows that lets you manage workflows, dependencies, serverless workloads, and resources in Kubernetes, using events from various sources.
Argo is useful for GitOps, making it easier to deploy applications and manage development lifecycles. With dev and ops teams increasingly merging, automated deployment is essential for simplifying rollbacks and facilitating audits and troubleshooting.
Deploying on Kubernetes using GitOps with Argo CD
GitOps emerged as a way to manage Kubernetes clusters and application delivery. It uses Git as the single source of truth for declarative applications and infrastructure. Having Git at the core of your delivery pipeline allows developers to leverage familiar tools and simplify operations and deployment tasks.
GitOps supports software agents that alert you of inconsistencies between the cluster and Git. Any detected divergence triggers Kubernetes reconcilers to roll back or update the cluster automatically.
GitOps with Argo CD
It is possible to implement Argo CD as a Kubernetes controller to continuously monitor running applications and compare their live state to the desired target state specified in your Git repository.
If the live state of your deployed application differs from the target state in Git, the application is out of sync. It triggers an Argo CD report that visualizes the differences. The report offers recommendations for manually or automatically matching the live state to the target state. You can automate updates to the current state of an application based on changes to the target state.
Argo CD offers the following features that are useful for GitOps:
- Argo CD control plane — a dedicated control plane with three important components:
- API server
- Repository server
- Controller
- Argo CD repository server — tores data from the Git repository linked to each application deployed in a Kubernetes cluster. The server generates a Kubernetes manifest from the Git source code, applying necessary plugins and configuration management tools.
- Argo CD API server — lets you interact with Argo CD via the CLI or web UI.
- Application controller — monitors the applications deployed in a cluster.
- Application CRD — Argo provides a custom resource definition that maps a Git repository’s configuration code to a Kubernetes namespace.
Using Argo CD to deploy applications to Kubernetes, GitOps style
Argo CD does not connect to a repository to read the source code of individual applications. Instead, when you build a new version of an application, you can deploy it using one of these options:
- In the Configuration repository, submit a Git merge request to use the new version.
- Automate the application’s CI/CD pipeline to push updates to the central code repository.
- Update the application’s Helm chart – Argo CD can pull the Helm chart from a repository.
When you’ve set the configuration in your Git repository, you need to select the language of your configuration. Argo CD supports several formats, including YAML files, Kustomize, Jsonnet declarations, and Helm charts.
In addition to Argo CD, the Argo project provides several other tools that can help you deploy on Kubernetes using GitOps:
- Argo Workflows — a containerized, parallel workflow engine.
- Argo Rollouts — a controller for progressive delivery in Kubernetes.
- Argo Events — an automation framework for event-based workflows.
Related content: Read our guide to Argo CD Helm Charts
Help us continuously improve
Please let us know if you have any feedback about this page.