Listing Endpoints in a Specified Namespace
Function
This API is used to obtain all endpoints in a specified namespace.
URI
GET /api/v1/namespaces/{namespace}/endpoints
Table 1 describes the parameters of this API.
|
Parameter |
Mandatory |
Description |
|---|---|---|
|
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. |
Request
N/A
Response
Response parameters:
For the description about response parameters, see Table 2.
Example response:
{
"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"
}
]
}
]
}
]
}
Status Code
Table 2 describes the status code of this API.
|
Status Code |
Description |
|---|---|
|
200 |
This operation succeeds, and a group of Endpoint resource objects is returned. |
For the description about error status codes, see Status Code.
Last Article: Listing Endpoints
Next Article: Updating a Specified Endpoint
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.