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
- AWS CLI configured.
- Docker installed.
- Helm installed.
- ArgoCD installed on the cluster.
kubectlinstalled and configured.eksctlinstalled.- Minikube (locally + metric server + ingress addons are enabled)
- 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
kubectlto access EKS cluster.
- 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/
-
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
- 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
- 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
Our GitOps workflow follows these principles:
- Git as Single Source of Truth: All configuration is stored in this repository
- Declarative Configuration: Desired state is declared in YAML files
- Automated Synchronization: ArgoCD ensures the cluster state matches Git
- Environment Promotion: Changes flow from dev → staging → production
We use Kargo to implement a promotion strategy:
- Development: Automatic deployment of new images
- Staging: WIP
- Production: Automatic deployment of new images
kubectl get applications -n argocd-
Add a Docker Hub token as a GitHub secret named
DOCKER_HUB_TOKEN -
Customize the workflow in
.github/workflows/main.ymlfor additional microservices
- Delete the Kubernetes EKS cluster and Helm related resources (ALB...)
