云容器实例 CCI-删除namespace下的所有MXJob:响应消息

时间:2024-11-06 15:35:37

响应消息

响应参数

响应参数的详细描述请参见表72

响应示例:

{
    "apiVersion": "kubeflow.org/v1",
    "items": [
        {
            "apiVersion": "kubeflow.org/v1",
            "kind": "MXJob",
            "metadata": {
                "creationTimestamp": "2019-07-24T08:57:01Z",
                "generation": 1,
                "name": "mxnet-job",
                "namespace": "kube-test",
                "resourceVersion": "72481787",
                "selfLink": "/apis/kubeflow.org/v1/namespaces/kube-test/mxjobs/mxnet-job",
                "uid": "001b5d2a-adf1-11e9-ba3a-b44326d0c915"
            },
            "spec": {
                "cleanPodPolicy": "Running",
                "jobMode": "MXTrain",
                "mxReplicaSpecs": {
                    "Scheduler": {
                        "replicas": 1,
                        "restartPolicy": "Never",
                        "template": {
                            "spec": {
                                "containers": [
                                    {
                                        "args": [
                                            "-c",
                                            "python train_imagenet.py"
                                        ],
                                        "command": [
                                            "/bin/bash"
                                        ],
                                        "image": "*.*.*.215:20202/cci/mxnet:xsw-dis",
                                        "name": "mxnet",
                                        "resources": {
                                            "limits": {
                                                "cpu": "1000m",
                                                "memory": "2Gi"
                                            },
                                            "requests": {
                                                "cpu": "1000m",
                                                "memory": "2Gi"
                                            }
                                        }
                                    }
                                ],
                                "imagePullSecrets": [
                                    {
                                        "name": "imagepull-secret"
                                    }
                                ]
                            }
                        }
                    },
                    "Server": {
                        "replicas": 1,
                        "restartPolicy": "Never",
                        "template": {
                            "spec": {
                                "containers": [
                                    {
                                        "args": [
                                            "-c",
                                            "python train_imagenet.py"
                                        ],
                                        "command": [
                                            "/bin/bash"
                                        ],
                                        "image": "*.*.*.215:20202/cci/mxnet:xsw-dis",
                                        "name": "mxnet",
                                        "resources": {
                                            "limits": {
                                                "cpu": "1000m",
                                                "memory": "2Gi"
                                            },
                                            "requests": {
                                                "cpu": "1000m",
                                                "memory": "2Gi"
                                            }
                                        }
                                    }
                                ],
                                "imagePullSecrets": [
                                    {
                                        "name": "imagepull-secret"
                                    }
                                ]
                            }
                        }
                    },
                    "Worker": {
                        "replicas": 1,
                        "restartPolicy": "Never",
                        "template": {
                            "spec": {
                                "containers": [
                                    {
                                        "args": [
                                            "-c",
                                            "python train_imagenet.py --benchmark 1  --network resnet --batch-size 1 --num-epochs 1 --kv-store dist_sync --num-examples 500"
                                        ],
                                        "command": [
                                            "/bin/bash"
                                        ],
                                        "image": "*.*.*.215:20202/cci/mxnet:xsw-dis",
                                        "name": "mxnet",
                                        "resources": {
                                            "limits": {
                                                "cpu": "1000m",
                                                "memory": "2Gi"
                                            },
                                            "requests": {
                                                "cpu": "1000m",
                                                "memory": "2Gi"
                                            }
                                        }
                                    }
                                ],
                                "imagePullSecrets": [
                                    {
                                        "name": "imagepull-secret"
                                    }
                                ]
                            }
                        }
                    }
                }
            },
            "status": {
                "conditions": [
                    {
                        "lastTransitionTime": "2019-07-24T08:57:01Z",
                        "lastUpdateTime": "2019-07-24T08:57:01Z",
                        "message": "MXJob mxnet-job is created.",
                        "reason": "MXJobCreated",
                        "status": "True",
                        "type": "Created"
                    },
                    {
                        "lastTransitionTime": "2019-07-24T08:57:01Z",
                        "lastUpdateTime": "2019-07-24T08:57:06Z",
                        "message": "MXJob mxnet-job is running.",
                        "reason": "MXJobRunning",
                        "status": "True",
                        "type": "Running"
                    }
                ],
                "mxReplicaStatuses": {
                    "Scheduler": {
                        "active": 1
                    },
                    "Server": {
                        "active": 1
                    },
                    "Worker": {
                        "active": 1
                    }
                },
                "startTime": "2019-07-24T08:57:01Z"
            }
        }
    ],
    "kind": "MXJobList",
    "metadata": {
        "continue": "",
        "resourceVersion": "72482111",
        "selfLink": "/apis/kubeflow.org/v1/namespaces/kube-test/mxjobs"
    }
}
support.huaweicloud.com/api-cci/cci_02_3154.html