通过KubeRay API Server - KubeRay Docs 文档进行尝试用apiserver进行创建ray-serve服务,但是apiserver似乎会创建多个ray-serve服务,并且频繁删除重启,不知道什么原因。
环境:
kuberay:0.5.0
ray:2.5.0
如何复现:
helm install kuberay-apiserver kuberay/kuberay-apiserver --version 0.5.0
helm install kuberay-operator kuberay/kuberay-operator --version 0.5.0
创建template:
curl -X POST ‘localhost:8888/apis/v1alpha2/namespaces/ray/compute_templates’
–header ‘Content-Type: application/json’
–data ‘{
“name”: “default-template”,
“namespace”: “ray”,
“cpu”: 1,
“memory”: 1
}’
创建ray-serve:
curl -X POST ‘localhost:8888/apis/v1alpha2/namespaces/ray/services’
–header ‘Content-Type: application/json’
–data ‘{
“name”: “test3”,
“namespace”: “ray”,
“user”: “user”,
“serveDeploymentGraphSpec”: {
“importPath”: “fruit.deployment_graph”,
“runtimeEnv”: "working_dir: "https://github.com/ray-project/test_dag/archive/c620251044717ace0a4c19d766d43c5099af8a77.zip\“\n”,
“serveConfigs”: [
{
“deploymentName”: “OrangeStand”,
“replicas”: 1,
“userConfig”: “price: 2”,
“actorOptions”: {
“cpusPerActor”: 0.1
}
},
{
“deploymentName”: “PearStand”,
“replicas”: 1,
“userConfig”: “price: 1”,
“actorOptions”: {
“cpusPerActor”: 0.1
}
},
{
“deploymentName”: “FruitMarket”,
“replicas”: 1,
“actorOptions”: {
“cpusPerActor”: 0.1
}
},{
“deploymentName”: “DAGDriver”,
“replicas”: 1,
“routePrefix”: “/”,
“actorOptions”: {
“cpusPerActor”: 0.1
}
}]
},
“clusterSpec”: {
“headGroupSpec”: {
“computeTemplate”: “default-template”,
“image”: “rayproject/ray:2.5.0”,
“serviceType”: “NodePort”,
“rayStartParams”: {
“dashboard-host”: “0.0.0.0”,
“metrics-export-port”: “8080”
},
“volumes”: []
},
“workerGroupSpec”: [
{
“groupName”: “small-wg”,
“computeTemplate”: “default-template”,
“image”: “rayproject/ray:2.5.0”,
“replicas”: 1,
“minReplicas”: 1,
“maxReplicas”: 1,
“rayStartParams”: {
“node-ip-address”: “$MY_POD_IP”
}
}
]
}
}’
结果: