In this article, I’ll walk through how I automated Argo CD configuration and microservices deployment on a Kubernetes cluster using Ansible.Why spend 5 minutes doing it when I can spend 5 days failing to automate it?Instead of manually installing Argo CD, applying manifests, and wiring everything step by step, the goal here is to make the setup repeatable, idempotent, and environment-friendly — something you can confidently run across clusters without worrying about human error.For this example, I’m using as the Kubernetes cluster. However, nothing in this approach is EKS-specific. You can follow along with (self-managed, GKE, AKS, kind, etc.) as long as your cluster credentials are available via:Ansible will use this kubeconfig to interact with the cluster and perform all required operati…
In this article, I’ll walk through how I automated Argo CD configuration and microservices deployment on a Kubernetes cluster using Ansible.Why spend 5 minutes doing it when I can spend 5 days failing to automate it?Instead of manually installing Argo CD, applying manifests, and wiring everything step by step, the goal here is to make the setup repeatable, idempotent, and environment-friendly — something you can confidently run across clusters without worrying about human error.For this example, I’m using as the Kubernetes cluster. However, nothing in this approach is EKS-specific. You can follow along with (self-managed, GKE, AKS, kind, etc.) as long as your cluster credentials are available via:Ansible will use this kubeconfig to interact with the cluster and perform all required operations.This article focuses specifically on:Installing and configuring Bootstrapping GitOps using Deploying a via Argo CDIf you’re interested in the — including CI pipelines, container builds, and infrastructure provisioning — this setup is part of a larger workflow I’ve described here:Think of this article as a deep dive into the GitOps bootstrap layer, where Ansible acts as the glue between infrastructure and continuous delivery.Before we start configuring Argo CD using Ansible, make sure you have the following prerequisites in place.Ansible relies on Python, so ensure Python is installed.2. Clone the IaC RepositoryAll Ansible playbooks and configuration used in this article live in the following repository:git clone https://github.com/c0dysharma/microservices-demo-Iaac.gitcd microservices-demo-IaacThis repository contains:Ansible playbooks for Argo CD setupArgo CD Application manifestsSupporting configuration for automationInstall Ansible on your system.4. Install Kubernetes Ansible CollectionTo allow Ansible to interact with Kubernetes, install the official collection:ansible-galaxy collection install kubernetes.coreThis provides Ansible modules for managing Kubernetes resources using kubeconfig-based authentication.5. Install Python DependenciesSome Kubernetes modules require additional Python libraries.From inside the repository, install the dependencies:cd ansiblepip install -r requirements.txt6. Kubernetes Cluster Access (EKS)This setup assumes you’re coming from my previous article where the EKS cluster was already created.Configure kubeconfig access to your cluster:aws eks update-kubeconfig –name myapp-cluster –region