Skip to content

Ashik-Domain/CD_Pipeline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GitOps-Based CD Pipeline with ArgoCD, AWS EKS, and Istio

Continuous deployment of microservices to Kubernetes using GitOps principles, with advanced traffic management and observability

🎯 Overview

Kubernetes-based deployment of the Bookinfo microservices application to AWS EKS, managed declaratively using ArgoCD. Implements GitOps principles for infrastructure management, with Istio service mesh providing traffic management, security, and comprehensive observability through Grafana, Prometheus, and Kiali.

πŸ—οΈ Architecture

Git Repository (Source of Truth)
    ↓
ArgoCD (Continuous Sync)
    ↓
AWS EKS Cluster
    β”œβ”€β†’ Bookinfo Microservices
    β”œβ”€β†’ Istio Service Mesh
    └─→ Observability Stack
        β”œβ”€ Prometheus (Metrics)
        β”œβ”€ Grafana (Visualization)
        └─ Kiali (Service Mesh Dashboard)

πŸ“Έ Deployment Evidence

Application Traffic Flow

Internal Traffic Flow Istio service mesh managing microservices communication

Service Mesh Monitoring

Kiali Dashboard Real-time visualization of service topology and health

Kiali Service Graph Traffic flow patterns and request rates between microservices

Metrics and Observability

Prometheus Metrics Prometheus scraping and storing application metrics

Prometheus Graph Time-series metrics visualization

Grafana Dashboard Grafana dashboards with Prometheus data source

Application Access

Public Static Page Productpage microservice exposed via Istio Gateway

Private Static Page Internal service pages accessible within the mesh

πŸ”§ Technologies Used

Category Tools
GitOps ArgoCD
Container Orchestration Kubernetes (AWS EKS)
Service Mesh Istio
Monitoring Prometheus, Grafana, Kiali
Cloud Platform AWS (EKS, EC2, VPC)
Application Bookinfo Microservices

✨ Key Features

  • βœ… GitOps Workflow: Git repository as single source of truth for deployments
  • βœ… Automated Sync: ArgoCD continuously monitors and deploys changes
  • βœ… Traffic Management: Istio-based traffic splitting and routing
  • βœ… Observability: Full-stack monitoring with Prometheus, Grafana, Kiali
  • βœ… Service Mesh: Istio handling service-to-service communication
  • βœ… Canary Deployments: Weighted traffic distribution between service versions

πŸš€ Deployment Workflow

GitOps Principle

  1. Source of Truth: All Kubernetes manifests stored in Git
  2. Automated Sync: ArgoCD continuously ensures manifests are applied to the cluster
  3. Declarative Deployment: Desired state defined in YAML manifests
  4. Self-Healing: ArgoCD ensures cluster state matches Git state
  5. Audit Trail: All changes tracked via Git commits

Image Update Behavior

The Productpage deployment references the latest container image tag (userashik187/productpage-app:latest).

When the CI pipeline builds and pushes a new image to Docker Hub, Kubernetes pulls the updated image when the Productpage pod is recreated. This behavior demonstrates Kubernetes image lifecycle management rather than a fully versioned GitOps rollout.

Learning Point: A production enhancement would implement versioned image tags (e.g., v1.0.0, v1.0.1) or ArgoCD Image Updater for deterministic Git-driven deployments with proper rollback capabilities.

Integration with CI Pipeline

  • CI pipeline builds and pushes the Productpage container image to Docker Hub using the latest tag
  • Kubernetes deployments reference this image in the manifests
  • When Productpage pods are recreated, Kubernetes pulls the updated image automatically
  • ArgoCD ensures that the Kubernetes manifests remain consistent with the Git repository

πŸ“Š Istio Traffic Management

The deployment includes advanced traffic management configurations:

Virtual Service (vs.yml)

Implements weighted traffic distribution across review service versions:

  • v1: 6% traffic
  • v2: 17% traffic
  • v3: 77% traffic

Enables canary deployments and A/B testing without code changes.

Destination Rules (ds.yml)

Defines service subsets for traffic routing:

  • Version-based routing (v1, v2, v3)
  • Load balancing policies
  • Connection pool settings

Gateway (bookinfo-gateway.yaml)

Exposes the application externally via Istio Ingress Gateway:

  • HTTP traffic on port 8080
  • Route configuration for productpage endpoints
  • External access control

πŸ” Security and Observability

Service Mesh Security:

  • Istio-managed service-to-service communication with support for mTLS
  • Service-to-service authentication capabilities
  • Network policy enforcement via Istio

Monitoring Stack:

  • Prometheus: Metrics collection from all pods
  • Grafana: Custom dashboards for visualization
  • Kiali: Service mesh topology and health checks

πŸ“ Repository Contents

.
β”œβ”€β”€ bookinfo.yaml              # Main application manifests
β”œβ”€β”€ bookinfo-gateway.yaml      # Istio Gateway configuration
β”œβ”€β”€ vs.yml                     # Virtual Service for traffic routing
β”œβ”€β”€ ds.yml                     # Destination Rules for subsets
β”œβ”€β”€ live_snapshots/            # Screenshots of running deployment
└── README.md                  # This file

πŸ› οΈ Setup Instructions

Prerequisites

  • AWS Account with EKS access
  • kubectl configured for EKS cluster
  • ArgoCD installed on cluster
  • Istio installed with demo profile

Deploy Application

  1. Configure ArgoCD application pointing to this repository
  2. Set sync policy to automatic
  3. ArgoCD will deploy all manifests to the cluster
  4. Access application via Istio Ingress Gateway

Access Observability Tools

# Kiali dashboard
istioctl dashboard kiali

# Grafana dashboard
istioctl dashboard grafana

# Prometheus UI
istioctl dashboard prometheus

πŸŽ“ What I Learned

  • Implementing GitOps workflows with ArgoCD for declarative infrastructure management
  • Managing service mesh traffic with Istio VirtualServices and DestinationRules
  • Configuring comprehensive observability using Prometheus, Grafana, and Kiali
  • Deploying and managing microservices on AWS EKS
  • Implementing canary deployments with weighted traffic distribution
  • Understanding service-to-service communication patterns in mesh architecture
  • Key Insight: Difference between declarative infrastructure (GitOps) and versioned deployments (proper CD)

πŸ”„ Production Improvements

This project demonstrates foundational concepts. For production use, I would implement:

  • Versioned Image Tags: Replace :latest with semantic versioning (e.g., v1.0.0)
  • ArgoCD Image Updater: Automate manifest updates when new images are pushed
  • Automated Rollbacks: Configure health checks to trigger automatic rollbacks on failure
  • Secret Management: Use AWS Secrets Manager or Sealed Secrets instead of plain Kubernetes secrets
  • Multi-environment Strategy: Separate dev/staging/prod with environment-specific configurations
  • CI/CD Integration: Add automated testing and deployment gates between environments

πŸ”— Related Projects

πŸ“ Technical Details

Application: Bookinfo microservices (4 services: productpage, details, reviews, ratings)
Cluster: AWS EKS (Kubernetes 1.x)
Service Mesh: Istio 1.x (demo profile)
GitOps Tool: ArgoCD
Deployment Strategy: Rolling updates with traffic shifting


Built with ❀️ demonstrating modern cloud-native deployment practices

Releases

No releases published

Packages

 
 
 

Contributors