云容器实例 CCI
云容器实例 CCI
- 最新动态
- 功能总览
- 产品介绍
- 计费说明
- 快速入门
- 用户指南
- 最佳实践
- 开发指南
-
API参考
- 使用前必读
- 如何调用API
- 快速入门
- API
-
Kubernetes API
- ConfigMap
- Pod
- StorageClass
- Service
- Deployment
- Ingress
- OpenAPIv2
- VolcanoJob
- Namespace
- ClusterRole
- Secret
- Endpoint
- ResourceQuota
- CronJob
-
API groups
- 查询APIVersions
- 查询所有v1版本的API
- 查询APIGroupList
- 查询APIGroup /apis/apps
- 查询所有apps/v1的API
- 查询APIGroup /apis/batch
- 查询APIGroup /apis/batch.volcano.sh
- 查询所有batch.volcano.sh/v1alpha1的API
- 查询所有batch/v1的API
- 查询所有batch/v1beta1的API
- 查询APIGroup /apis/crd.yangtse.cni
- 查询所有crd.yangtse.cni/v1的API
- 查询APIGroup /apis/extensions
- 查询所有extensions/v1beta1的API
- 查询APIGroup /apis/metrics.k8s.io
- 查询所有metrics.k8s.io/v1beta1的API
- 查询APIGroup /apis/networking.cci.io
- 查询所有networking.cci.io/v1beta1的API
- 查询APIGroup /apis/rbac.authorization.k8s.io
- 查询所有rbac.authorization.k8s.io/v1的API
- Event
- PersistentVolumeClaim
- RoleBinding
- StatefulSet
- Job
- ReplicaSet
- 数据结构
- 权限和授权项
- 附录
- 历史API
- 修订记录
- SDK参考
- 场景代码示例
- 常见问题
- 视频帮助
- 文档下载
- 通用参考
链接复制成功!
更新TFJob
功能介绍
更新TFJob。如下字段可被更新:
- metadata.labels
- metadata.annotations
- spec.activeDeadlineSeconds
- spec.ttlSecondsAfterFinished
- spec.cleanPodPolicy
URI
PATCH /apis/kubeflow.org/v1/namespaces/{namespace}/tfjobs/{name}
参数 |
是否必选 |
描述 |
---|---|---|
name |
Yes |
name of the TFJob |
namespace |
Yes |
object name and auth scope, such as for teams and projects |
参数 |
是否必选 |
描述 |
---|---|---|
pretty |
No |
If 'true’, then the output is pretty printed. |
请求消息
请求参数:
“Content-Type”消息头说明请参见PATCH请求方法操作说明。
目前只支持“Merge Patch”。
请求示例:
Content-Type: application/merge-patch+json
{ "metadata": { "labels": { "app": "test" } } }
响应消息
响应参数:
响应参数的详细描述请参见表154。
响应示例:
{ "apiVersion": "kubeflow.org/v1", "kind": "TFJob", "metadata": { "creationTimestamp": "2019-07-24T07:17:01.000Z", "generation": 1, "labels": { "app": "test" }, "name": "tfjob-test", "namespace": "kube-test", "resourceVersion": "72444814", "selfLink": "/apis/kubeflow.org/v1/namespaces/kube-test/tfjobs/tfjob-test", "uid": "083cc6df-ade3-11e9-aaa4-340a9837e413" }, "spec": { "backoffLimit": 6, "tfReplicaSpecs": { "Ps": { "replicas": 1, "template": { "spec": { "containers": [ { "args": [ "python", "/opt/tf-benchmarks/scripts/tf_cnn_benchmarks/tf_cnn_benchmarks.py", "--batch_size=1", "--model=resnet50", "--variable_update=parameter_server", "--flush_stdout=true", "--num_gpus=1", "--local_parameter_device=cpu", "--device=cpu", "--data_format=NHWC" ], "image": "*.*.*.215:20202/cci/tf-benchmarks-cpu:v1", "name": "tensorflow", "ports": [ { "containerPort": 2222, "name": "tfjob-port" } ], "resources": { "limits": { "cpu": "2", "memory": "4Gi" }, "requests": { "cpu": "2", "memory": "4Gi" } } } ], "imagePullSecrets": [ { "name": "imagepull-secret" } ], "restartPolicy": "OnFailure" } } }, "Worker": { "replicas": 1, "template": { "spec": { "containers": [ { "args": [ "python", "/opt/tf-benchmarks/scripts/tf_cnn_benchmarks/tf_cnn_benchmarks.py", "--batch_size=1", "--model=resnet50", "--variable_update=parameter_server", "--flush_stdout=true", "--local_parameter_device=cpu", "--device=cpu", "--data_format=NHWC" ], "image": "*.*.*.215:20202/cci/tf-benchmarks-cpu:v1", "name": "tensorflow", "ports": [ { "containerPort": 2222, "name": "tfjob-port" } ], "resources": { "limits": { "cpu": "2", "memory": "4Gi" }, "requests": { "cpu": "2", "memory": "4Gi" } } } ], "imagePullSecrets": [ { "name": "imagepull-secret" } ], "restartPolicy": "OnFailure" } } } } }, "status": { "conditions": [ { "lastTransitionTime": "2019-07-24T07:16:13.000Z", "lastUpdateTime": "2019-07-24T07:16:13.000Z", "message": "TFJob tfjob-test is created.", "reason": "TFJobCreated", "status": "True", "type": "Created" }, { "lastTransitionTime": "2019-07-24T07:16:18.000Z", "lastUpdateTime": "2019-07-24T07:16:18.000Z", "message": "TFJob tfjob-test is running.", "reason": "TFJobRunning", "status": "True", "type": "Running" } ], "replicaStatuses": { "PS": { "active": 1 }, "Worker": { "active": 1 } }, "startTime": "2019-07-24T07:16:13.000Z" } }
状态码
状态码 |
描述 |
---|---|
200 |
OK |
401 |
Unauthorized |
500 |
Internal Error |
403 |
Forbidden |
409 |
Conflict |
400 |
BadRequest |
父主题: TFJob