A Kubernetes control plane for planning and applying NVIDIA MIG GPU partitions. The planner computes a target allocation from workload demand and capacity catalogs, materializes GPU layouts, and builds a dependency DAG for the transition. The executor applies the plan through node agents and registers model runtimes with the request router.
ArrivalSnapshot → Planner Controller → Python Planner → MigActionPlan
↑ ↓
PhysicalGpuRegistry ← Node Agent ← Transition Executor
↓
Model Runtime → Router
- Kubernetes and MIG-capable NVIDIA GPUs, with compatible NVIDIA drivers and GPU Operator.
- Go 1.23.12 for control-plane builds.
- Python 3.13 and a Gurobi license for the planner service.
- A container registry accessible to the cluster and model weights accessible to the runtimes.
Build from k8s-extension-go/; each Dockerfile uses that directory as its context.
Replace REGISTRY with your registry address.
cd k8s-extension-go
docker build -f Dockerfile.control-plane -t REGISTRY/migrant-control-plane:go .
docker build -f Dockerfile.node-agent -t REGISTRY/migrant-node-agent:go .
docker build -f Dockerfile.planner-engine -t REGISTRY/migrant-planner-engine:go .
docker build -f Dockerfile.runtime-router -t REGISTRY/migrant-runtime-router:go .
docker build -f Dockerfile.model-runtime -t REGISTRY/migrant-model-runtime:torchvision .
docker build -f Dockerfile.model-runtime-llm -t REGISTRY/migrant-model-runtime:llm-transformers .Push the images to your registry. Dockerfile.model-runtime-llm-baked additionally
supports packaging language-model weights into an image.
Supply your deployment's scenario.yaml, workload definitions, and capacity catalogs.
The planner reads /etc/migrant/scenario.yaml by default; an ArrivalSnapshot can
select another mounted file using spec.scenarioPath.
The scenario fields are name, sourceStateRef, targetStateRef, workloadOrder,
workloadRefs, sourceArrival, and targetArrival, with either
profileCatalogRefs or profileCatalogConfigMaps. Optional fields include
policyRef, migRulesRef, and transition. Reference maps must use the same
workload keys. File references resolve relative to the scenario file.
The live controller supplies the current allocation, and demand from the snapshot
overrides the scenario demand. sourceStateRef is used when the planner is invoked
without a current-state override.
Create the configuration from a local directory containing these YAML files.
The deployment mounts this ConfigMap at /etc/migrant:
kubectl apply -f manifests/base/namespace.yaml
kubectl apply -f manifests/crds/core-crds.yaml
kubectl -n or-sim create configmap migrant-planner-config --from-file=/path/to/planner-config/Keep referenced files in that directory, or add volume mounts for nested directories. Configure Gurobi licensing for the planner container before starting it.
Update image addresses, runtime image environment variables, node selectors, and
network settings in the manifests for your cluster. Existing defaults use
localhost:10690 and a control-plane node named or-sim-control-plane.
The node agent requires privileged GPU access and exposes exact MIG slot resources.
kubectl apply -f manifests/control-plane/serviceaccount-rbac.yaml
kubectl apply -f manifests/deployments/
kubectl apply -f manifests/node/
kubectl apply -f manifests/control-plane/controllers.yaml
kubectl -n or-sim get pods
kubectl -n or-sim get physicalgpuregistries,arrivalsnapshots,migactionplansThe epoch controller collects demand from the router and creates ArrivalSnapshots.
The cluster-state manager maintains PhysicalGpuRegistry state. The planner
controller creates MigActionPlans; the transition executor applies their actions,
starts inference runtimes, and updates routes. The planner exposes /healthz and
accepts planning requests at /plan.
k8s-extension-go/
cmd/ Controllers, executor, node agent, router, inference runtimes
internal/ Kubernetes client and shared system types
planner-engine/app/ Allocation, layout materialization, transition planning, HTTP service
manifests/ CRDs, RBAC, deployments, node agents
tools/ Build-context packaging and GPU Operator placement
Dockerfile.* Component images
go.mod, go.sum Go dependencies
Only system source, build files, and deployment manifests are included. Tests, experiments, baselines, mock scenarios, profiling measurements, results, and the optional migctl utility are excluded from the published file history. Deployment-specific workloads, catalogs, and model weights are supplied separately.