Kubernetes Deployment
Memanto is a single-binary FastAPI app — there are no leader-election, sticky-session, or shared-volume concerns. The deployment manifests below are intentionally minimal; adapt the resources, security context, and ingress to fit your cluster. The manifests use the cloud backend by default. The “On-Prem Backend” section at the bottom shows how to add the Moorcheh server (and optionally Ollama) as sibling pods.Deployment
/ready is the right liveness probe because it always returns 200 once the process is up — using /health would restart pods every time Moorcheh has a hiccup. /health is the right readiness probe because it gates traffic on actual Moorcheh connectivity.
Service
Secret
Ingress (TLS Termination)
Horizontal Pod Autoscaler
Memanto is I/O-bound, so scale on CPU:On-Prem Backend on Kubernetes
To run Moorcheh inside the same cluster as Memanto, add a Moorcheh deployment and pointMOORCHEH_ONPREM_URL at the in-cluster Service.
ConfigMap for the embedding / LLM block (replace with your provider of choice):
Secret + an init container or external-secrets operator instead of embedding them in the ConfigMap.
Then update the Memanto Deployment env block to point at the in-cluster Moorcheh:
MOORCHEH_API_KEY env var when on-prem — it isn’t consulted in on-prem mode.
Ollama on Kubernetes (Optional)
If you want fully local inference, add an Ollama Deployment with persistent storage for model weights:"base_url": "http://ollama:11434" for both embedding and LLM blocks.
After deploy, pull your models once:
NetworkPolicy (Recommended)
Restrict who can reach Memanto and Moorcheh:Applying
Cloud Platform Quick-Reference
The Memanto image is generic — it runs anywhere that can host a container.| Platform | Notes |
|---|---|
| AWS ECS / Fargate | Pull image from ECR. Inject MOORCHEH_API_KEY via AWS Secrets Manager. ALB → port 8000. |
| Google Cloud Run | Inject API key via Secret Manager. Set --port 8000. Concurrency 80–100 per instance is a reasonable starting point. |
| Azure Container Instances / Apps | Inject API key via Azure Key Vault references. |
| DigitalOcean App Platform | Set the env var MOORCHEH_API_KEY in the App definition. |
| Fly.io | flyctl secrets set MOORCHEH_API_KEY=…. Set [http_service] internal_port = 8000. |