This project is a comprehensive hands-on learning environment for understanding GitOps principles using Kind, Kubernetes, and ArgoCD. It deploys a sample FastAPI application using the GitOps approach for continuous deployment.
- Understand the GitOps workflow for deploying applications to Kubernetes
- Learn how ArgoCD implements continuous deployment from Git repositories
- Explore Kubernetes concepts like Deployments, Services, Ingress, and ConfigMaps
- See how NGINX Ingress Controller routes traffic to applications
- Docker
- kind (Kubernetes in Docker)
- kubectl (Kubernetes command-line tool)
- setup.sh: Interactive setup script with clear step-by-step progress indicators
- cleanup.sh: Script to cleanly delete the Kubernetes cluster
- Makefile: Simplifies setup and cleanup tasks
- kind.yaml: Configuration file for the Kind cluster with port mappings
- app/sample/main.py: Simple FastAPI application with endpoints:
/: Returns a greeting message with hostname/ping: Basic endpoint returning "pong"/health: Health check endpoint
- app/sample/Dockerfile: Container image definition for the app
- app/sample/requirements.txt: Python dependencies
- app/sample/manifests/overlays/kind/:
- deployment.yaml: Defines how the app is deployed
- service.yaml: Exposes the app within the cluster
- ingress.yaml: Configures external access to the app
- manifests/argocd-base-cm.yaml: ArgoCD base configuration
- manifests/deploy-argocd-ingress.yaml: Exposes ArgoCD UI externally
- manifests/deploy-ingress-nginx.yaml: Sets up the NGINX ingress controller
- manifests/sample-app.yaml: Defines how ArgoCD should deploy our sample app
Run the setup script to create a fully working environment:
make setupOr run the script directly:
./setup.shThe setup process will:
- Verify prerequisites (Docker, kind, kubectl)
- Create a Kubernetes cluster using Kind
- Install and configure ArgoCD
- Deploy the NGINX ingress controller
- Configure ingress routes
- Deploy the sample FastAPI application using ArgoCD
- Provide ArgoCD credentials
After setup completes:
- Sample Application: http://localhost:8000/sample
- ArgoCD UI: http://localhost:8000/argocd
- Username: admin
- Password: (provided at the end of setup)
- Examine how ArgoCD is monitoring the Git repository
- Make changes to the application manifests
- Watch ArgoCD detect and apply the changes automatically
When you're done exploring, clean up with:
make cleanupOr run the script directly:
./cleanup.shThis project is licensed under the MIT License.