A complete example of deploying an Apollo Supergraph (Router + Subgraphs) for both local development and Kubernetes deployment.
Run the Apollo Supergraph locally without Kubernetes:
# Run both subgraphs and router
./run-local.sh
# Show help
./run-local.sh --help
Benefits of local development:
- ✅ Faster startup - No Kubernetes overhead
- ✅ Easier debugging - Direct access to logs
- ✅ No resource constraints - Runs directly on your machine
- ✅ Simple cleanup - Just Ctrl+C to stop
# Setup minikube with required addons
./setup-minikube.sh
# Deploy Apollo Supergraph with 2 replicas (default)
./run-k8s.sh
# Deploy with custom number of replicas
./run-k8s.sh --replicas 3
# Show help
./run-k8s.sh --help
- Node.js (for subgraphs)
- Docker (for Kubernetes deployment)
- minikube (for Kubernetes deployment)
- kubectl (for Kubernetes deployment)
Set up your Apollo Studio environment:
# Set up Apollo Studio credentials (safe - won't overwrite existing)
./setup-env.sh
# Run all local tests
./test-local.sh
# Test specific components
./test-local.sh --subgraphs # Test subgraphs only
./test-local.sh --composition # Test supergraph composition only
./test-local.sh --docker # Test Docker builds only
./test-local.sh --router # Test router only
# Test Apollo Supergraph deployment
./test-k8s.sh
# Stop all services
Ctrl+C (in the terminal running run-local.sh)
# Clean up deployment
./cleanup-k8s.sh
# Stop and delete minikube cluster
./kill-minikube.sh
- SETUP.md - Detailed setup and configuration instructions
- README-K8S.md - Kubernetes-specific deployment details