A minimal provisioning control plane that provisions “services” onto a compute substrate. This MVP uses Kubernetes as the substrate (Deployment + Service). The public API stays intentionally substrate-neutral so the same contract could later be backed by another scheduler/runtime.
- Expose a small control-plane API to provision a service: image + port → running workload
- Endpoint reachable via
kubectl port-forward svc/<deployment_name> 8080:<service_port>
- Endpoint reachable via
- Keep the workflow developer-friendly (Tilt, docs UI, quick iteration)
- Demonstrate core control-plane concerns: resource creation order, cleanup, logs, and basic ergonomics
Prereqs:
- Docker Desktop with Kubernetes enabled
- kubectl configured (uses your local kubeconfig)
- Tilt
Install Tilt (pick one):
brew install tiltcurl -fsSL https://raw.githubusercontent.com/tilt-dev/tilt/master/scripts/install.sh | bashStart the project:
tilt upThis uses docker-compose.yml via Tilt. The FastAPI control plane runs as a Docker container and talks to the local Kubernetes cluster using your mounted kubeconfig.
Preferred: FastAPI docs UI
- Open
http://localhost:8001/docs - Use the
/deploymentsendpoints from the interactive UI (request body validation, live responses)
Deploy nginx:
curl -X POST "http://localhost:8001/deployments" \
-H "Content-Type: application/json" \
-d '{"image_name":"nginx:latest","deployment_name":"test","port":80}'Get logs:
curl "http://localhost:8001/deployments/test/logs"Delete:
curl -X DELETE "http://localhost:8001/deployments/test"Control plane (FastAPI) → Kubernetes API → Deployments/Services/Pods
- FastAPI runs in a Docker container (via docker-compose + Tilt), not inside the Kubernetes cluster for this MVP.
- The API container mounts your local kubeconfig and uses the Kubernetes Python client to talk to the cluster.
- API responsibilities:
POST /deploymentscreates a Deployment and a matching ServiceGET /deployments/{deployment_name}/logsfetches logs from the first matching PodDELETE /deployments/{deployment_name}deletes the Service then the Deployment
- Diagram:

This MVP focuses on the core provisioning loop (deploy → logs → delete). Up next, I'd add:
- Polling for deployment readiness - Right now,
/logscan fail if the pod isn't ready yet. I'd add a status endpoint that polls until healthy. - Health checks (readiness/liveness probes) - Kubernetes won't route traffic until the app is healthy. Critical for zero-downtime deployments.
- Horizontal scaling - A system like this needs autoscaling. This would be the primitive (
PATCH /deployments/{name}/scale).
These are stubbed in k8s_utils.py