更新K8s集群中应用的K8s服务Service
接口URL:/v1/app/inst/updateK8sService
Content-Type:application/json
请求方式:post
请求体参数说明:
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
appDeployId | String | String | 是 | 应用部署ID,数据来源于获取已部署应用列表 |
name | String | String | 是 | K8s service名称,开头为小写字母,后可为大小写字母以及数字 |
servicesPorts | Array | Array | 否 | K8s Service端口映射表 |
trafficPolicy | String | String | 否 | K8s service路由策略,填写内容可为Local/Cluster,默认为Local |
type | String | String | 是 | K8s service类型,填写内容可为ClusterIP/NodePort |
表servicesPorts
参数名 | 示例值 | 参数类型 | 是否必填 | 参数描述 |
---|---|---|---|---|
nodePort | Integer | Integer | 否 | 节点端口 |
port | Integer | Integer | 是 | 服务端口 |
protocol | String | String | 是 | 服务协议 |
targetPort | Integer | Integer | 是 | 容器端口 |
请求示例:
{"appDeployId":"29b25b16-0b71-48ae-8e82-3746a052b98d","name":"test1","servicesPorts":[{"nodePort":80,"port":80,"protocol":"TCP","targetPort":80}],"trafficPolicy":"Local","type":"ClusterIP"}
返回参数说明:
参数名 | 示例值 | 参数类型 | 参数描述 |
---|---|---|---|
statusCode | Integer | Integer | 响应编码 2000 success |
message | String | String | 消息内容 |
returnObj | Object | Object | 返回数据 |
error | String | String | 调用错误时返回的错误编码 |
返回示例:成功
{"statusCode":2000,"returnObj":{"changeOrderId":"29b25b16-0b71-48ae-8e82-3746a052b98d "},"message":"成功"}
返回示例:失败
{"statusCode":191251,"error":"MSAP_1251","message":"非法的应用部署ID"}