更新时间:2022-04-18 GMT+08:00
替换指定的Endpoints
功能介绍
该API用于替换指定Namespace下指定的Endpoints资源对象。
其中以下字段支持更新:
- metadata.name
- metadata.namespace
- metadata.selfLink
- metadata.resourceVersion
- metadata.uid
- metadata.labels
- metadata.clusterName
- metadata.generateName
- metadata.annotations
- subnet.*
- metadata.deletionGracePeriodSeconds
请求消息
请求参数:
请求参数的详细描述请参见表2。
请求示例:
{ "kind": "Endpoints", "apiVersion": "v1", "metadata": { "name": "cluster-test" }, "subsets": [ { "addresses": [ { "ip": "172.16.106.150" } ], "ports": [ { "port": 1 } ] }, { "addresses": [ { "ip": "172.16.79.223" } ], "ports": [ { "port": 1 } ] },{ "addresses": [ { "ip": "172.16.106.154" } ], "ports": [ { "port": 1 } ] } ] }
响应消息
响应参数:
响应参数的详细描述请参见请求消息。
响应示例:
{ "kind": "Endpoints", "apiVersion": "v1", "metadata": { "name": "cluster-test", "namespace": "default", "selfLink": "/api/v1/namespaces/default/endpoints/cluster-test", "uid": "88a7230f-5d36-11e6-aeb9-286ed488fafe", "resourceVersion": "3203", "creationTimestamp": "2016-08-08T07:05:48Z" }, "subsets": [ { "addresses": [ { "ip": "172.16.106.150" }, { "ip": "172.16.106.154" }, { "ip": "172.16.79.223" } ], "ports": [ { "port": 1, "protocol": "TCP" } ] } ] }
父主题: Endpoints
