Skip to content

Latest commit

 

History

109 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

Simple application demonstrate using Kubernetes in AWS with:

  • EKS K8s Cluster
  • Event Driven Architecture using NATs
  • Monitoring and Login using Grafana, Loki, Prometheus through Helm charts.
  • Gitops for K8s cluster using ArgoCD

Prerequisites:

  • AWS CLI configured.
  • Docker installed.
  • Helm installed.
  • ArgoCD installed on the cluster.
  • kubectl installed and configured.
  • eksctl installed.
  • Minikube (locally + metric server + ingress addons are enabled)

Quick Start

  1. EKS Cluster Setup:
  • Create EKS cluster through AWS console.
  • Create Node Group or Fargate Profile
  • Create Role for cluster, Node Group.
  • Create Access entry + policy for kubectl to access EKS cluster.
  1. Deploy the ArgoCD Project:
    k kustomize argocd/overlays/{dev/prod} --enable-helm | kubectl apply -f -

2.1 Destroy the ArgoCD Project: bash k kustomize argocd/overlays/{dev/prod} --enable-helm | kubectl delete -f - # In case failed to delete application https://argo-cd.readthedocs.io/en/latest/user-guide/app_deletion/

  1. Create local DNS (minikube):

    # File /etc/hosts
    127.0.0.1 simple-love-{dev/prod}.com
    127.0.0.1 simple-love-monitoring-{dev/prod}.com
    
    #Tunnel minikube cluster to localhost
    minikube tunnel

Access

  1. ArgoCD UI
    minikube service argocd-server -n argocd
    # Get ArgoCD Password (User: admin)
    kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 --decode ; echo
  2. Grafana UI
    kubectl get secret -n simple-love-monitoring-{dev/prod} monitoring-{dev/prod}-grafana -o jsonpath="{.data.admin-password}" | base64 --decode
    https://simple-love-monitoring-{dev/prod}.com

GitOps Workflow

Our GitOps workflow follows these principles:

  1. Git as Single Source of Truth: All configuration is stored in this repository
  2. Declarative Configuration: Desired state is declared in YAML files
  3. Automated Synchronization: ArgoCD ensures the cluster state matches Git
  4. Environment Promotion: Changes flow from dev → staging → production

Promotion Strategy

We use Kargo to implement a promotion strategy:

  1. Development: Automatic deployment of new images
  2. Staging: WIP
  3. Production: Automatic deployment of new images

Usage Examples

View Deployment Status

kubectl get applications -n argocd

Setup Requirements

  1. Add a Docker Hub token as a GitHub secret named DOCKER_HUB_TOKEN

  2. Customize the workflow in .github/workflows/main.yml for additional microservices

Cleanup:

  • Delete the Kubernetes EKS cluster and Helm related resources (ALB...)

Demo

Argocd UI

About

Simple application demonstrate using Kubernetes in AWS with: EKS K8s Cluster Event Driven Architecture using NATs Monitoring and Login using Grafana, Loki, Prometheus through Helm charts. Automate deployment, Gitops using ArgoCD

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages