Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

7 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ GitOps WordPress Platform

Validate Kubernetes Kubernetes Argo CD GitOps AWS AWS Secrets Manager External Secrets NGINX Ingress WordPress MySQL License

Production-Ready GitOps Deployment of WordPress on Kubernetes

Deploy WordPress on Kubernetes using Argo CD, GitHub Actions, AWS Secrets Manager, External Secrets Operator, and NGINX Ingress Controller.

This project demonstrates a modern GitOps workflow where Git serves as the single source of truth for Kubernetes deployments. Every change is validated through a CI pipeline before being automatically synchronized to the Kubernetes cluster by Argo CD.


πŸ“– Overview

Modern Kubernetes deployments should be secure, automated, and fully declarative.

This repository demonstrates how to deploy a production-style WordPress application on Kubernetes using GitOps principles while keeping sensitive credentials outside the Git repository.

Instead of storing Kubernetes Secrets inside Git:

  • AWS Secrets Manager securely stores application credentials.
  • External Secrets Operator synchronizes secrets into Kubernetes.
  • Argo CD continuously reconciles the cluster with the desired state stored in Git.
  • GitHub Actions validates every Kubernetes manifest before deployment.

The result is a secure, repeatable, and production-oriented deployment workflow suitable for modern DevOps environments.


πŸ“š Table of Contents


✨ Project Highlights

  • πŸš€ GitOps-based Continuous Deployment using Argo CD
  • ☸️ Kubernetes-native WordPress and MySQL deployment
  • πŸ”„ Automated synchronization with Git as the single source of truth
  • πŸ” Secure secret management using AWS Secrets Manager
  • πŸ”‘ External Secrets Operator for dynamic Kubernetes Secret creation
  • ⚑ GitHub Actions CI pipeline
  • βœ… YAML linting with yamllint
  • βœ… Kubernetes manifest validation using kubeconform
  • πŸ›‘οΈ Kubernetes security scanning with Checkov
  • 🌐 NGINX Ingress for external application access
  • πŸ’Ύ Persistent storage for WordPress and MySQL
  • ❀️ Kubernetes readiness and liveness probes
  • πŸ“Š Resource requests and limits
  • πŸ“‚ Modular Kubernetes manifest structure
  • πŸ“– Well-documented deployment process

πŸ“Œ Project Status

Property Value
Project Name GitOps WordPress Platform
Version v1.0
Status Completed
Deployment Model GitOps
CI GitHub Actions
CD Argo CD
Platform Kubernetes
Cloud AWS
Database MySQL 8
CMS WordPress 6
Secret Management AWS Secrets Manager
Secret Synchronization External Secrets Operator
Ingress NGINX Ingress Controller
License MIT

🎯 Project Objectives

This project demonstrates how to build a secure and automated Kubernetes application deployment pipeline using GitOps principles.

The main objectives are:

  • Build a production-style GitOps workflow using Argo CD.
  • Keep Kubernetes manifests under version control.
  • Eliminate plaintext Kubernetes Secret manifests from Git.
  • Store application secrets securely in AWS Secrets Manager.
  • Automatically synchronize secrets into Kubernetes using External Secrets Operator.
  • Validate Kubernetes manifests automatically through GitHub Actions.
  • Perform Kubernetes security scanning during every code change.
  • Demonstrate declarative application deployment using Kubernetes.
  • Provide a reusable reference architecture for GitOps deployments.
  • Showcase modern DevOps and Cloud Engineering practices.

πŸš€ Key Features

πŸ”„ GitOps Continuous Deployment

  • Git as the single source of truth
  • Automatic synchronization using Argo CD
  • Self-healing deployments
  • Automatic reconciliation
  • Declarative Kubernetes manifests

⚑ Continuous Integration

Every push to GitHub automatically triggers a CI pipeline.

The pipeline performs:

  • YAML syntax validation
  • Kubernetes manifest validation
  • Security scanning
  • Pull Request validation

This prevents invalid Kubernetes manifests from reaching the cluster.


πŸ” Secure Secret Management

Instead of storing sensitive credentials inside Git:

  • AWS Secrets Manager securely stores application credentials.
  • External Secrets Operator retrieves secrets dynamically.
  • Kubernetes Secrets are generated automatically.
  • WordPress and MySQL consume Kubernetes Secrets at runtime.

No plaintext credentials are committed to the repository.


☸️ Kubernetes Native Deployment

The application uses standard Kubernetes resources including:

  • Namespace
  • Deployments
  • Services
  • PersistentVolumeClaims
  • Ingress
  • ExternalSecret resources

All resources are defined declaratively.


πŸ’Ύ Persistent Storage

Persistent Volume Claims ensure application data survives Pod restarts.

Persistent storage is configured for:

  • MySQL database
  • WordPress application data

🌐 Application Networking

NGINX Ingress Controller provides external access to the application.

Features include:

  • Host-based routing
  • ClusterIP services
  • Single entry point
  • Kubernetes-native networking

πŸ›οΈ High-Level Architecture

The following diagram illustrates the complete deployment lifecycleβ€”from committing code to GitHub to automatically deploying WordPress on Kubernetes while securely retrieving secrets from AWS Secrets Manager.

                               Developer
                                   β”‚
                              git push
                                   β”‚
                                   β–Ό
                         GitHub Repository
                                   β”‚
                                   β–Ό
                     GitHub Actions (CI Pipeline)
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β”‚                  β”‚                  β”‚
          β–Ό                  β–Ό                  β–Ό
     yamllint         kubeconform         Checkov
          β”‚                  β”‚                  β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                   β”‚
                          Validation Successful
                                   β”‚
                                   β–Ό
                               Argo CD
                                   β”‚
                      Automatic Synchronization
                                   β”‚
                                   β–Ό
                        Kubernetes API Server
                                   β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β–Ό                        β–Ό                        β–Ό
    Namespace                WordPress                MySQL
          β”‚                        β”‚                      β”‚
          β”‚                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
          β”‚                                   β–Ό
          β”‚                          Kubernetes Secrets
          β”‚                                   β–²
          β”‚                                   β”‚
          β–Ό                        External Secrets Operator
                                              β”‚
                                              β–Ό
                                   AWS Secrets Manager

πŸ“ Architecture Overview

This project follows a GitOps deployment model, where Git is the single source of truth for the Kubernetes cluster.

Whenever a change is pushed to GitHub:

  1. GitHub Actions validates the Kubernetes manifests.
  2. The manifests are checked using:
    • yamllint (YAML formatting)
    • kubeconform (Kubernetes schema validation)
    • Checkov (security best practices)
  3. If the repository passes validation, Argo CD continuously monitors the Git repository.
  4. Argo CD detects changes and synchronizes the Kubernetes cluster automatically.
  5. External Secrets Operator retrieves secrets from AWS Secrets Manager.
  6. WordPress and MySQL consume the generated Kubernetes Secrets.

This approach removes the need to manually run kubectl apply, ensuring the cluster always matches the desired state stored in Git.


πŸ”„ GitOps Workflow

The deployment workflow is completely Git-driven.

Developer
     β”‚
     β”‚ Update Kubernetes Manifest
     β–Ό
Git Commit
     β”‚
     β–Ό
Git Push
     β”‚
     β–Ό
GitHub Repository
     β”‚
     β–Ό
Argo CD detects new commit
     β”‚
     β–Ό
Automatic Synchronization
     β”‚
     β–Ό
Kubernetes Cluster Updated

Benefits

  • Git becomes the single source of truth.
  • No manual deployments.
  • Automatic reconciliation.
  • Easy rollback using Git history.
  • Consistent deployments across environments.

⚑ Continuous Integration Workflow

Every code change is validated before it reaches the cluster.

Developer
     β”‚
     β–Ό
Git Push
     β”‚
     β–Ό
GitHub Actions
     β”‚
     β”œβ”€β”€ Checkout Repository
     β”œβ”€β”€ YAML Lint
     β”œβ”€β”€ Kubernetes Validation
     └── Security Scan
     β”‚
     β–Ό
Validation Successful

CI Pipeline Components

Tool Purpose
GitHub Actions Continuous Integration
yamllint YAML formatting validation
kubeconform Kubernetes schema validation
Checkov Kubernetes security scanning

πŸ” Secrets Management Workflow

Instead of committing Kubernetes Secret manifests to Git, this project stores secrets securely in AWS Secrets Manager.

Administrator
      β”‚
      β–Ό
Create Secrets
      β”‚
      β–Ό
AWS Secrets Manager
      β”‚
      β–Ό
External Secrets Operator
      β”‚
      β–Ό
Kubernetes Secret
      β”‚
      β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β–Ό              β–Ό
WordPress Pod    MySQL Pod

Advantages

  • Secrets never exist inside Git.
  • Centralized secret management.
  • Native Kubernetes Secret resources.
  • IAM-based authentication.
  • Easy secret rotation.

πŸ› οΈ Technology Stack

Category Technology Purpose
Cloud Platform AWS Secret storage
Container Orchestration Kubernetes Container orchestration
GitOps Argo CD Continuous deployment
Version Control Git Source control
Repository Hosting GitHub Git repository
Continuous Integration GitHub Actions CI pipeline
YAML Validation yamllint YAML linting
Kubernetes Validation kubeconform Manifest validation
Security Scanning Checkov Kubernetes security analysis
Secret Management AWS Secrets Manager Secure credential storage
Secret Synchronization External Secrets Operator Create Kubernetes Secrets
Web Application WordPress 6 Content Management System
Database MySQL 8 Relational Database
Networking NGINX Ingress Controller External application access
Storage PersistentVolumeClaims Persistent storage
Configuration YAML Kubernetes manifests
Automation Bash AWS secret creation script

πŸ“‚ Repository Structure

gitops-wordpress-platform
β”‚
β”œβ”€β”€ .github
β”‚   └── workflows
β”‚       └── validate-kubernetes.yml
β”‚
β”œβ”€β”€ docs
β”‚   β”œβ”€β”€ architecture
β”‚   β”œβ”€β”€ architecture.md
β”‚   β”œβ”€β”€ deployment-guide.md
β”‚   β”œβ”€β”€ screenshots
β”‚   └── troubleshooting.md
β”‚
β”œβ”€β”€ kubernetes
β”‚   β”œβ”€β”€ argocd
β”‚   β”‚   └── application.yaml
β”‚   β”‚
β”‚   β”œβ”€β”€ ingress
β”‚   β”‚   └── ingress.yaml
β”‚   β”‚
β”‚   β”œβ”€β”€ mysql
β”‚   β”‚   β”œβ”€β”€ mysql-deployment.yaml
β”‚   β”‚   β”œβ”€β”€ mysql-pvc.yaml
β”‚   β”‚   └── mysql-service.yaml
β”‚   β”‚
β”‚   β”œβ”€β”€ namespace
β”‚   β”‚   └── namespace.yaml
β”‚   β”‚
β”‚   β”œβ”€β”€ secrets
β”‚   β”‚   β”œβ”€β”€ mysql-external-secret.yaml
β”‚   β”‚   └── wordpress-external-secret.yaml
β”‚   β”‚
β”‚   └── wordpress
β”‚       β”œβ”€β”€ wordpress-deployment.yaml
β”‚       β”œβ”€β”€ wordpress-pvc.yaml
β”‚       └── wordpress-service.yaml
β”‚
β”œβ”€β”€ scripts
β”‚   └── create-aws-secrets.sh
β”‚
β”œβ”€β”€ .env.example
β”œβ”€β”€ .gitignore
β”œβ”€β”€ LICENSE
└── README.md

πŸ“ Repository Overview

Directory Description
.github/workflows GitHub Actions CI workflow for validating Kubernetes manifests
docs Project documentation, architecture diagrams, deployment guide and troubleshooting
kubernetes/argocd Argo CD Application manifest
kubernetes/namespace Creates the WordPress namespace
kubernetes/mysql MySQL Deployment, Service and PersistentVolumeClaim
kubernetes/wordpress WordPress Deployment, Service and PersistentVolumeClaim
kubernetes/secrets ExternalSecret resources
kubernetes/ingress NGINX Ingress configuration
scripts Automation scripts for AWS Secrets Manager
.env.example Example environment configuration
README.md Project documentation

🎯 Design Principles

This project follows several modern DevOps and cloud-native design principles.

GitOps First

Git is the single source of truth.

Every infrastructure or application change should be committed to Git instead of manually applying manifests with kubectl.

Benefits include:

  • Version-controlled deployments
  • Automatic synchronization
  • Easy rollback
  • Self-healing infrastructure
  • Consistent environments

Secure Secret Management

Sensitive credentials are never stored inside Git.

Instead:

  • AWS Secrets Manager securely stores secrets.
  • External Secrets Operator synchronizes secrets into Kubernetes.
  • Kubernetes applications consume generated Secret resources.

This reduces the risk of accidentally exposing credentials in source control.


Declarative Kubernetes

Every Kubernetes resource is defined as YAML.

Resources include:

  • Namespace
  • Deployments
  • Services
  • PersistentVolumeClaims
  • Ingress
  • ExternalSecret resources
  • Argo CD Application

Declarative manifests make deployments reproducible and easy to audit.


Continuous Validation

Every push to GitHub automatically triggers a validation pipeline.

The pipeline checks:

  • YAML syntax
  • Kubernetes manifest correctness
  • Security best practices

Only validated manifests are considered ready for deployment through GitOps.


Modular Repository Structure

Each Kubernetes component is organized into its own directory.

This improves:

  • Readability
  • Maintainability
  • Reusability
  • Collaboration


πŸ”’ Security Notes

This project includes Checkov security scanning as part of the GitHub Actions CI pipeline.

Some Checkov recommendations (such as running containers as a non-root user, using a read-only root filesystem, or dropping all Linux capabilities) are intentionally not enforced in this project because the official WordPress and MySQL container images require elevated privileges during their initialization process.

These findings are reviewed and documented rather than ignored.

In a production environment, these recommendations can be addressed by:

  • Using hardened or custom-built container images
  • Running applications as non-root users
  • Pinning container images by digest
  • Mounting secrets as volumes instead of environment variables where supported
  • Applying additional Pod Security Standards and runtime hardening

This project prioritizes demonstrating a functional GitOps workflow while documenting the security trade-offs of using the official container images.


πŸ“‹ Prerequisites

Before deploying this project, ensure the following components are available.

Kubernetes Cluster

A running Kubernetes cluster with:

  • Kubernetes v1.30+
  • Default StorageClass
  • NGINX Ingress Controller
  • Argo CD
  • External Secrets Operator
  • ClusterSecretStore configured for AWS Secrets Manager

Note

This repository only contains the application manifests. The Kubernetes infrastructure can be provisioned separately.


AWS Requirements

You need:

  • AWS Account
  • AWS CLI installed
  • AWS CLI configured
  • IAM user or role with access to AWS Secrets Manager

Verify AWS access:

aws sts get-caller-identity

Local Tools

Install the following tools:

Tool Purpose
Git Clone the repository
kubectl Kubernetes management
AWS CLI Manage AWS Secrets Manager
Bash Run automation scripts

Verify installation:

git --version

kubectl version --client

aws --version

βš™οΈ Project Configuration

Clone Repository

git clone https://github.com/<YOUR_USERNAME>/gitops-wordpress-platform.git

cd gitops-wordpress-platform

Configure Environment Variables

Create your environment file.

cp .env.example .env

Example:

AWS_REGION=us-east-1

MYSQL_ROOT_PASSWORD=root123
MYSQL_DATABASE=wordpress
MYSQL_USER=wordpress
MYSQL_PASSWORD=wordpress123

WORDPRESS_DB_HOST=mysql
WORDPRESS_DB_NAME=wordpress
WORDPRESS_DB_USER=wordpress
WORDPRESS_DB_PASSWORD=wordpress123

πŸ” Upload Secrets to AWS Secrets Manager

Run:

bash scripts/create-aws-secrets.sh

The script automatically:

  • Validates AWS credentials
  • Creates secrets if they don't exist
  • Updates existing secrets if already present

The following secrets are created:

wordpress/mysql
wordpress/app

Verify:

aws secretsmanager list-secrets

πŸš€ Deploy the Application

Once AWS Secrets Manager has been configured, deploy the application.

Apply the Argo CD Application:

kubectl apply -f kubernetes/argocd/application.yaml

Expected output:

application.argoproj.io/wordpress-gitops created

Argo CD will automatically:

  • Create the WordPress namespace
  • Deploy MySQL
  • Deploy WordPress
  • Create Services
  • Create PersistentVolumeClaims
  • Synchronize External Secrets
  • Generate Kubernetes Secrets
  • Configure NGINX Ingress

No additional kubectl apply commands are required.


πŸ”„ Deployment Flow

Clone Repository
        β”‚
        β–Ό
Configure .env
        β”‚
        β–Ό
Run create-aws-secrets.sh
        β”‚
        β–Ό
AWS Secrets Manager
        β”‚
        β–Ό
kubectl apply application.yaml
        β”‚
        β–Ό
Argo CD
        β”‚
        β–Ό
External Secrets Operator
        β”‚
        β–Ό
Kubernetes Secrets
        β”‚
        β–Ό
Deploy MySQL
        β”‚
        β–Ό
Deploy WordPress
        β”‚
        β–Ό
Configure Ingress
        β”‚
        β–Ό
Application Ready

πŸ€– Continuous Integration

Every push to the main branch automatically triggers GitHub Actions.

The pipeline performs:

  • Checkout repository
  • YAML linting
  • Kubernetes manifest validation
  • Kubernetes security scan

This prevents invalid manifests from reaching the GitOps repository.


πŸš€ Continuous Deployment

Argo CD continuously monitors this repository.

Whenever a Kubernetes manifest changes:

Developer

↓

git push

↓

GitHub Repository

↓

Argo CD detects changes

↓

Automatic Synchronization

↓

Kubernetes Cluster Updated

No manual deployment is required.

Git becomes the single source of truth.


βœ… Verification

After Argo CD synchronizes the application, verify each component to ensure the deployment completed successfully.


☸️ Verify Namespace

kubectl get ns

Expected output:

NAME          STATUS
wordpress     Active

πŸ“¦ Verify Pods

kubectl get pods -n wordpress

Example:

NAME                               READY   STATUS
mysql-xxxxxxxxxx-xxxxx             1/1     Running
wordpress-xxxxxxxxxx-xxxxx         1/1     Running
wordpress-xxxxxxxxxx-yyyyy         1/1     Running
wordpress-xxxxxxxxxx-zzzzz         1/1     Running

All Pods should eventually reach the Running state.


🌐 Verify Services

kubectl get svc -n wordpress

Example:

NAME          TYPE        CLUSTER-IP
mysql         ClusterIP
wordpress     ClusterIP

πŸ’Ύ Verify Persistent Volume Claims

kubectl get pvc -n wordpress

Example:

NAME             STATUS
mysql-pvc        Bound
wordpress-pvc    Bound

Both PVCs should be in the Bound state.


πŸ” Verify External Secrets

List ExternalSecret resources.

kubectl get externalsecret -n wordpress

Example:

NAME                 STATUS
mysql-secret         SecretSynced
wordpress-secret     SecretSynced

Describe one of them:

kubectl describe externalsecret mysql-secret -n wordpress

Expected:

Ready: True
Secret Synced

Repeat for the WordPress secret if required.


πŸ”‘ Verify Kubernetes Secrets

kubectl get secret -n wordpress

Example:

mysql-secret
wordpress-secret

These Secrets should be created automatically by the External Secrets Operator.


☁️ Verify AWS Secrets Manager

List secrets:

aws secretsmanager list-secrets

Expected:

wordpress/mysql
wordpress/app

πŸ”„ Verify Argo CD

Check the Argo CD Application.

kubectl get applications -n argocd

Expected:

NAME                SYNC STATUS   HEALTH STATUS
wordpress-gitops    Synced        Healthy

Describe the application:

kubectl describe application wordpress-gitops -n argocd

The application should report:

  • Healthy
  • Synced
  • No synchronization errors

🌍 Verify Ingress

kubectl get ingress -n wordpress

Example:

NAME                  CLASS   HOSTS
wordpress-ingress     nginx   wordpress

🌐 Access WordPress

If using a local DNS entry, update your hosts file.

Linux/macOS:

/etc/hosts

Windows:

C:\Windows\System32\drivers\etc\hosts

Example:

<MASTER_PUBLIC_IP>    wordpress

Open:

http://wordpress

You should see the WordPress installation page.


πŸ€– Verify GitHub Actions

Open your GitHub repository.

Navigate to:

GitHub
    ↓
Actions

The latest workflow should complete successfully.

The workflow validates:

  • YAML syntax
  • Kubernetes manifests
  • Kubernetes security

A successful run confirms that the repository is ready for GitOps deployment.


πŸ”„ GitOps Demonstration

One of the easiest ways to verify GitOps is working is to modify a deployment.

Example:

Change:

replicas: 3

to:

replicas: 4

Commit and push:

git add .
git commit -m "Scale WordPress deployment"
git push

Argo CD detects the new commit automatically.

Verify:

kubectl get pods -n wordpress

You should now see four WordPress Pods running.

No manual deployment command such as:

kubectl apply

is required.


πŸŽ‰ Deployment Complete

At this point the platform includes:

  • βœ… GitHub Actions CI
  • βœ… GitOps with Argo CD
  • βœ… WordPress
  • βœ… MySQL
  • βœ… AWS Secrets Manager
  • βœ… External Secrets Operator
  • βœ… Kubernetes Secrets
  • βœ… NGINX Ingress
  • βœ… Persistent Storage
  • βœ… Automated Kubernetes Validation
  • βœ… Security Scanning

The Kubernetes cluster is now managed declaratively through Git, with Argo CD continuously reconciling the desired state.


πŸ“Έ Project Walkthrough

This walkthrough demonstrates the complete GitOps workflow of the project, from securely storing secrets in AWS Secrets Manager to automatic deployment, monitoring, and GitOps-based application scaling using Argo CD.


1. GitHub Repository

The GitOps repository contains Kubernetes manifests, GitHub Actions workflows, Argo CD configuration, monitoring resources, and project documentation.

GitHub Repository


2. AWS Secrets Manager

Application and database credentials are securely stored in AWS Secrets Manager and synchronized into Kubernetes using External Secrets Operator.

AWS Secrets Manager


3. Initial Kubernetes Deployment

After configuring AWS Secrets Manager, the GitOps application is deployed into the Kubernetes cluster.

Kubernetes Deployment


4. Argo CD Application

Argo CD continuously watches the Git repository and keeps the Kubernetes cluster synchronized with the desired state stored in Git.

Argo CD Application


5. Argo CD Resource Tree

The complete application topology managed by Argo CD, including:

  • Namespace
  • Deployments
  • ReplicaSets
  • Pods
  • Services
  • Persistent Volume Claims
  • External Secrets
  • Kubernetes Secrets
  • NGINX Ingress

Argo CD Resource Tree


πŸ“Š Monitoring with Prometheus & Grafana

Prometheus continuously collects Kubernetes metrics while Grafana visualizes CPU, memory, and network utilization.


6. Grafana Cluster Dashboard

Cluster-wide monitoring showing CPU usage, memory utilization, resource requests, and limits.

Grafana Cluster Dashboard


7. WordPress CPU Monitoring

CPU utilization of WordPress and MySQL workloads inside the wordpress namespace.

WordPress CPU


8. WordPress Memory Monitoring

Memory usage and resource limits for all application pods.

WordPress Memory


9. WordPress Network Monitoring

Real-time network bandwidth and packet metrics collected by Prometheus.

WordPress Network


10. Prometheus Metrics

Example PromQL query showing live CPU usage metrics for WordPress pods.

Prometheus Query


πŸš€ GitOps Demonstration

One of the main objectives of this project is to demonstrate a complete GitOps workflow where Git serves as the single source of truth.

The following sequence shows how changing the desired state in Git automatically updates the Kubernetes cluster.


Step 1 β€” Update Deployment

The replica count in the WordPress Deployment manifest is changed from 3 to 4.

replicas: 4

The change is committed and pushed to GitHub.

Scale Change


Step 2 β€” GitHub Actions Triggered

Pushing to the repository automatically triggers the GitHub Actions workflow, which validates all Kubernetes manifests.

GitHub Actions Running


Step 3 β€” Validation Successful

The CI pipeline successfully validates the Kubernetes manifests before deployment.

GitHub Actions Success


Step 4 β€” Automatic Kubernetes Scaling

Argo CD detects the new Git commit, synchronizes the desired state, and Kubernetes automatically scales the deployment from 3 to 4 running WordPress pods.

Kubernetes Scaled


Step 5 β€” Argo CD Synchronization Complete

Argo CD successfully synchronizes the latest Git commit, and the application topology now reflects the updated deployment with four running WordPress replicas.

Argo CD Synced


Step 6 β€” WordPress Application Verification

After Argo CD synchronizes the latest Git commit, the WordPress application is successfully deployed and accessible through the configured NGINX Ingress.

The dashboard confirms that the application is running correctly, database connectivity is working, persistent storage is mounted, and the deployment is fully operational.

WordPress Dashboard


βœ… GitOps Workflow Summary

Developer
    β”‚
    β–Ό
Modify Kubernetes Manifest
    β”‚
    β–Ό
Git Commit
    β”‚
    β–Ό
Git Push
    β”‚
    β–Ό
GitHub Actions
(Validate Kubernetes YAML)
    β”‚
    β–Ό
Validation Success
    β”‚
    β–Ό
Argo CD Detects Git Change
    β”‚
    β–Ό
Automatic Synchronization
    β”‚
    β–Ό
Kubernetes Applies Changes
    β”‚
    β–Ό
Application Updated
    β”‚
    β–Ό
Prometheus Collects Metrics
    β”‚
    β–Ό
Grafana Visualizes Metrics

This project demonstrates a complete production-style GitOps workflow by integrating GitHub Actions, Argo CD, AWS Secrets Manager, External Secrets Operator, NGINX Ingress, Prometheus, and Grafana to automate deployment, synchronization, monitoring, and infrastructure management on Kubernetes.


πŸ“Š Project Highlights

This project demonstrates practical implementation of modern cloud-native technologies.

Category Implementation
GitOps Argo CD
CI GitHub Actions
Kubernetes Validation kubeconform
YAML Validation yamllint
Security Scanning Checkov
Secret Management AWS Secrets Manager
Secret Synchronization External Secrets Operator
Kubernetes Networking NGINX Ingress
Storage PersistentVolumeClaims
Database MySQL
Application WordPress

πŸ“š Documentation

Additional documentation is available in the docs/ directory.

File Description
architecture.md Project architecture
deployment-guide.md Step-by-step deployment guide
troubleshooting.md Common issues and fixes

πŸ›£οΈ Roadmap

Future enhancements planned for this project.

Security

  • HTTPS using cert-manager
  • Network Policies
  • Pod Security Standards
  • Image digest pinning
  • Secret rotation

Kubernetes

  • Horizontal Pod Autoscaler (HPA)
  • PodDisruptionBudget
  • Pod Anti-Affinity
  • StatefulSet for MySQL
  • High Availability database deployment

Observability

  • Grafana dashboards
  • Prometheus alert rules
  • Loki log aggregation
  • Distributed tracing

CI/CD

  • GitHub Actions
  • YAML Validation
  • Kubernetes Validation
  • Security Scanning
  • Automatic container image updates

πŸŽ“ Learning Outcomes

This project demonstrates hands-on experience with:

  • GitOps using Argo CD
  • Kubernetes application deployment
  • AWS Secrets Manager
  • External Secrets Operator
  • GitHub Actions CI
  • Kubernetes manifest validation
  • Kubernetes security scanning
  • NGINX Ingress Controller
  • Persistent storage
  • Kubernetes Deployments and Services
  • Infrastructure-independent application deployment

🀝 Contributing

Contributions are welcome.

  1. Fork the repository.
  2. Create a feature branch.
git checkout -b feature/my-feature
  1. Commit your changes.
git commit -m "feat: add new feature"
  1. Push the branch.
git push origin feature/my-feature
  1. Open a Pull Request.

πŸ“„ License

This project is licensed under the MIT License.

See the LICENSE file for more information.


⭐ Related Project

This application is designed to run on a Kubernetes platform.

Infrastructure for the cluster can be provisioned using a companion infrastructure repository or any Kubernetes cluster that includes:

  • Kubernetes
  • Argo CD
  • External Secrets Operator
  • NGINX Ingress Controller
  • AWS Secrets Manager integration

πŸ‘¨β€πŸ’» Author

Vijay VW

Cloud β€’ DevOps β€’ Kubernetes β€’ AWS


⭐ Support

If you found this project helpful:

  • ⭐ Star this repository
  • 🍴 Fork the project
  • πŸ“’ Share it with others

Your support helps improve the project and encourages future development.


Made with ❀️ by Vijay VW

About

GitOps-based WordPress deployment on Kubernetes using Argo CD, GitHub Actions, AWS Secrets Manager, External Secrets Operator, Prometheus, Grafana, and NGINX Ingress.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages