列出指定Namespace下的Endpoints
功能介绍
该API用于获取指定Namespace下的所有Endpoints对象。
URI
GET /api/v1/namespaces/{namespace}/endpoints
表1 描述该API的参数。
参数 |
是否必选 |
描述 |
---|---|---|
pretty |
No |
If 'true', then the output is pretty printed. |
labelSelector |
No |
A selector to restrict the list of returned objects by their labels. Defaults to everything. |
fieldSelector |
No |
A selector to restrict the list of returned objects by their fields. Defaults to everything. |
includeUninitialized |
No |
If true, partially initialized resources are included in the response. |
watch |
No |
Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion. |
resourceVersion |
No |
When specified with a watch call, shows changes that occur after that particular version of a resource. Defaults to changes from the beginning of history. |
timeoutSeconds |
No |
Timeout for the list/watch call. |
namespace |
Yes |
Object name and auth scope, such as for teams and projects. |
请求消息
N/A
响应消息
响应参数:
响应参数的详细描述请参见表2。
响应示例:
{ "kind": "EndpointsList", "apiVersion": "v1", "metadata": { "selfLink": "/api/v1/namespaces/default/endpoints", "resourceVersion": "598704" }, "items": [ { "metadata": { "name": "kubernetes", "namespace": "default", "selfLink": "/api/v1/namespaces/default/endpoints/kubernetes", "uid": "64593b5d-f83d-11e7-9c3c-fa163eb8ad1a", "resourceVersion": "49", "creationTimestamp": "2018-01-13T08:40:21Z", "enable": true }, "subsets": [ { "addresses": [ { "ip": "192.168.0.64" } ], "ports": [ { "name": "https", "port": 5444, "protocol": "TCP" } ] } ] } ] }
