Skip to main content

Deploying with Argo CD

Argo CDArgo CD

Argo CD is a declarative, GitOps continuous delivery tool for Kubernetes.

Argo CD is the primary tool for deploying resources to any of Gjensidige's Kubernetes clusters. Argo provides a robust and flexible way to deploy your application, as well as rolling back to previous versions. The project is also a part of the Cloud Native Computing Foundation landscape together with other leading Cloud Native tools.

Declarative Setup

Argo CD at Gjensidige is configured strictly using Declarative Setup. This means all create and edit actions in the GUI are disabled. Changes are done by submitting a Pull Request to the argocd repo at GitHub. The change process is described in more detail in the repo README.

When your team is initially onboarded to Kubernetes at Gjensidige, an Argo CD Project will be created for you. The project is a grouping mechanism for your team's applications and restricts which namespace(s) you are permitted to deploy resources into.

GitOps

gitops.tech :bulb:

If you're not familiar with the idea of GitOps, it's highly recommended to read the well-formulated explanation at https://gitops.tech

The core idea of GitOps is having a Git repository that always contains declarative descriptions of the infrastructure currently desired in the production environment and an automated process to make the production environment match the described state in the repository

GitOps is at the core of using Argo CD. This implies that your GitHub repo at all times has to describe what is deployed in Kubernetes. You should for example never use latest to describe which container image is running. You should instead update container image tag in your resource manifest just after pushing the container image to Azure Container Registry. There are multiple ways of achieving this and some good alternatives are described here.

hottips :fire:

Learn how to automate GitOps practices for your Kubernetes manifests with GitHub Actions in this guide

Official Documentation