POST /mltk/start_container
POST /mltk/start_container
Start a container (Docker) or deployment (Kubernetes).
Description. Start a container (Docker) or deployment (Kubernetes). The handler resolves the image from docker_images.conf, injects API token and observability env vars, applies HPA overrides for Kubernetes, and probes the resulting endpoint.
Body (JSON).
{
"payload": {
"image": "golden-cpu",
"model": "my_model",
"runtime": "nvidia",
"cluster": "docker",
"mode": "DEV",
"hpa_enabled": "0",
"min_cpu": "250m",
"max_cpu": "1000m",
"min_memory": "512Mi",
"max_memory": "2Gi",
"min_replicas": "1",
"max_replicas": "3",
"cpu_threshold_percent":"80"
}
}
Response (200).
{
"status": "success",
"message": "The container started successfully",
"updated_config": {
"id": "container_abc123",
"api_url": "http://10.0.0.5:5000",
"api_url_external": "http://host.example.com:5000",
"jupyter_url": "http://10.0.0.5:8888",
"status": "Waiting for Url to start",
"cluster": "docker",
"mode": "DEV"
}
}
Example.
curl -sk -u "$SPLUNK_USER:$SPLUNK_PASSWORD" -X POST
-H "Content-Type: application/json"
--data @- "$SPLUNK_HOST/servicesNS/nobody/Splunk_ML_Toolkit/mltk/start_container?output_mode=json" <<'JSON'
{
"payload": {
"image": "golden-cpu",
"model": "my_model",
"cluster": "docker",
"mode": "DEV"
}
}
JSON