📦

Understanding Argo CD for GitOps

May 23, 2025

Lecture Notes: Argo CD - A GitOps Tool for Kubernetes

Introduction

  • Topic: Introduction to Argo CD, a GitOps tool in the DevOps world.
  • Prerequisite: Understanding of GitOps.
  • Purpose:
    • Explain Argo CD and its common use cases.
    • Demonstrate how Argo CD works.
    • Hands-on demo project for practical experience with Argo CD.

What is Argo CD?

  • Type: Continuous Delivery (CD) tool.
  • Comparison with Jenkins/GitLab CI/CD:
    • Traditional CD tools like Jenkins require installing tools like kubectl and configuring Kubernetes access.
    • Argo CD simplifies by integrating into Kubernetes clusters and using a pull-based approach.

Challenges with Traditional CI/CD Tools

  1. Tool Setup: Requires external tools like kubectl, helm, and managing credentials.
  2. Security: Need to distribute Kubernetes credentials to multiple projects and clusters.
  3. Visibility: Limited monitoring of deployment status; Jenkins doesn't track real-time deployment states.

How Argo CD Addresses These Challenges

  • Integration: Argo CD runs inside the Kubernetes cluster, using a pull model.
  • Configuration: Monitors Git repositories for changes and applies them automatically.
  • Supports: YAML files, Helm charts, Customize files, etc.
  • Separation of CI/CD:
    • CI remains with Jenkins.
    • CD is handled by Argo CD.

Benefits of GitOps and Argo CD

  • Configuration as Code: Kubernetes configurations are stored in Git repositories.
  • Automatic Syncing: Detects changes in cluster or repository and syncs them.
  • Transparency: Git repository is the single source of truth.
  • Easy Rollbacks: Revert to previous configurations quickly.
  • Disaster Recovery: Rebuilding clusters from Git configurations.
  • Security: Limits direct cluster access, managing access via Git.

Argo CD Specific Benefits

  • Access Management: Configure access through Git, not direct cluster credentials.
  • Kubernetes API Extension: Uses Kubernetes' own resources for management.
  • Real-Time Updates: Provides real-time state of applications and configurations.

Configuration and Deployment

  • Deployment: Deployed in the Kubernetes cluster as an extension.
  • Application Configuration: Define which Git repository to sync with which cluster.
  • Multi-Cluster Management:
    • Single Argo CD instance can manage multiple clusters.

Hands-On Demo

  1. Setup:
    • Use Minikube and a Git repository with YAML files for deployment.
  2. Deployment Steps:
    • Install Argo CD using a YAML file.
    • Access Argo CD UI for monitoring and configuration.
  3. Application Configuration:
    • Use YAML files to configure Argo CD to track specific repositories and paths.
  4. Testing Changes:
    • Update image versions and other configurations in the repository.
    • Argo CD automatically syncs changes to the cluster.
  5. Manual Change Detection:
    • Argo CD reverts manual changes and maintains Git-defined state.

Conclusion

  • Not a Replacement: Argo CD complements, not replaces, Jenkins or GitLab CI/CD.
  • Alternatives: Other GitOps tools like Flux CD.
  • Demo Highlight: Demonstrated a fully automated CD pipeline setup using Argo CD.

Additional Resources

  • Sponsored Mention: Kasten's K10 for Kubernetes data management.
  • Further Exploration: Links to repositories and further reading on GitOps and Argo CD.