Before running this POC, you need the following installed locally:
- minikube - Local Kubernetes cluster
- kubectl - Kubernetes CLI
- Docker - For building container images
- LocalStack (optional) - For local AWS services
minikube start# Deploy everything via Kustomize
kubectl apply -k gitops/
# Wait for services to be ready
kubectl get ksvc -w# In one terminal, start port-forwarding:
kubectl port-forward -n knative-serving svc/kourier 8080:80
# In another terminal, test the function:
curl -H "Host: hello.default.example.com" http://localhost:8080Note: The Knative service is named hello (see gitops/apps/hello-py/service.yaml). Functions scale to zero after ~60 seconds of inactivity and automatically scale up when receiving requests.
./scripts/start-localstack.sh./scripts/init-aws-resources.sh./scripts/test-sqs.sh# View logs from the SQS processor
kubectl logs -l serving.knative.dev/service=process-sqs-event -fThis POC demonstrates:
- Knative Serving - Serverless HTTP functions that scale to zero
- Knative Eventing - Event-driven architecture with brokers and triggers
- SQS Integration - AWS SQS as an event source (using LocalStack)
- GitOps Pattern - All resources defined as Kubernetes manifests
SQS Queue → IntegrationSource → Broker → Trigger → Function
cd functions/hello-py
docker build -t hello-py:latest .
# Load into minikube
minikube image load hello-py:latest# After making changes to manifests
kubectl apply -k gitops/
# Or for a specific app
kubectl apply -k gitops/apps/hello-py/# Delete all resources
kubectl delete -k gitops/
# Stop LocalStack
./scripts/stop-localstack.sh
# Stop minikube
minikube stop- This is a POC for learning purposes, not production-ready
- In production, you'd separate infrastructure (brokers, sources) from application deployments
- Secrets should be managed with proper secret management tools (not checked into git)
- The
aws-credentialssecret uses LocalStack test credentials