1.2 KiB
1.2 KiB
Simple Deployment Guide
🚀 One-Command Deploy
Just run this from the kubernetes folder:
./build-and-deploy.sh
This will:
- ✅ Build both Docker images (FastAPI + Worker)
- ✅ Deploy everything to Kubernetes
- ✅ Set up auto-scaling
📋 What Gets Deployed
- FastAPI: 4 pods initially (scales 4-20 based on load)
- Workers: 2 pods initially (scales 2-10 based on load)
- Auto-scaling: Enabled for both
- Pod Distribution: Spreads across nodes automatically
✅ After Deployment
Check status:
kubectl get pods -n nats-backend
kubectl get services -n nats-backend
kubectl get hpa -n nats-backend
View logs:
kubectl logs -f deployment/fastapi-backend -n nats-backend
kubectl logs -f deployment/nats-worker -n nats-backend
Test FastAPI:
kubectl port-forward -n nats-backend service/fastapi-backend 8000:80
curl http://localhost:8000/health
🔧 Configuration
All settings are in manifests/:
secrets.yaml- NATS credentials and external APIfastapi-deployment.yaml- FastAPI configworker-deployment.yaml- Worker config
That's it! Everything is ready to deploy! 🎉