EndpointSlice [discovery.k8s.io/v1]

    EndpointSlice represents a subset of the endpoints that implement a service. For a given service there may be multiple EndpointSlice objects, selected by labels, which must be joined to produce the full set of endpoints.

    Type

    Required

    • addressType

    .endpoints

    Description

    endpoints is a list of unique endpoints in this slice. Each slice may include a maximum of 1000 endpoints.

    Type

    array

    .endpoints[]

    Description

    Endpoint represents a single logical “backend” implementing a service.

    Type

    object

    Required

    • addresses
    PropertyTypeDescription

    addresses

    array (string)

    addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.

    conditions

    object

    EndpointConditions represents the current condition of an endpoint.

    deprecatedTopology

    object (string)

    deprecatedTopology contains topology information part of the v1beta1 API. This field is deprecated, and will be removed when the v1beta1 API is removed (no sooner than kubernetes v1.24). While this field can hold values, it is not writable through the v1 API, and any attempts to write to it will be silently ignored. Topology information can be found in the zone and nodeName fields instead.

    hints

    object

    EndpointHints provides hints describing how an endpoint should be consumed.

    hostname

    string

    hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.

    nodeName

    string

    nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.

    targetRef

    ObjectReference core/v1

    targetRef is a reference to a Kubernetes object that represents this endpoint.

    zone

    string

    zone is the name of the Zone this endpoint exists in.

    .endpoints[].conditions

    Description

    EndpointConditions represents the current condition of an endpoint.

    Type

    object

    PropertyTypeDescription

    ready

    boolean

    ready indicates that this endpoint is prepared to receive traffic, according to whatever system is managing the endpoint. A nil value indicates an unknown state. In most cases consumers should interpret this unknown state as ready. For compatibility reasons, ready should never be “true” for terminating endpoints.

    serving

    boolean

    serving is identical to ready except that it is set regardless of the terminating state of endpoints. This condition should be set to true for a ready endpoint that is terminating. If nil, consumers should defer to the ready condition. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.

    terminating

    boolean

    terminating indicates that this endpoint is terminating. A nil value indicates an unknown state. Consumers should interpret this unknown state to mean that the endpoint is not terminating. This field can be enabled with the EndpointSliceTerminatingCondition feature gate.

    .endpoints[].hints

    Description

    EndpointHints provides hints describing how an endpoint should be consumed.

    Type

    object

    PropertyTypeDescription

    forZones

    array

    forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing.

    forZones[]

    object

    ForZone provides information about which zones should consume this endpoint.

    .endpoints[].hints.forZones

    Description

    forZones indicates the zone(s) this endpoint should be consumed by to enable topology aware routing.

    Type

    array

    .endpoints[].hints.forZones[]

    Description

    ForZone provides information about which zones should consume this endpoint.

    Type

    object

    Required

    • name
    PropertyTypeDescription

    name

    string

    name represents the name of the zone.

    .ports

    Description

    ports specifies the list of network ports exposed by each endpoint in this slice. Each port must have a unique name. When ports is empty, it indicates that there are no defined ports. When a port is defined with a nil port value, it indicates “all ports”. Each slice may include a maximum of 100 ports.

    Type

    array

    .ports[]

    Description

    EndpointPort represents a Port used by an EndpointSlice

    Type

    object

    PropertyTypeDescription

    string

    The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 and ). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol.

    name

    string

    The name of this port. All ports in an EndpointSlice must have a unique name. If the EndpointSlice is dervied from a Kubernetes service, this corresponds to the Service.ports[].name. Name must either be an empty string or pass DNS_LABEL validation: must be no more than 63 characters long. must consist of lower case alphanumeric characters or ‘-‘. * must start and end with an alphanumeric character. Default is empty string.

    port

    integer

    The port number of the endpoint. If this is not specified, ports are not restricted and must be interpreted in the context of the specific consumer.

    protocol

    string

    The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP.

    API endpoints

    The following API endpoints are available:

      • GET: list or watch objects of kind EndpointSlice
    • /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices

      • DELETE: delete collection of EndpointSlice

      • POST: create an EndpointSlice

    • /apis/discovery.k8s.io/v1/namespaces/{namespace}/endpointslices/{name}

      • DELETE: delete an EndpointSlice

      • GET: read the specified EndpointSlice

      • PATCH: partially update the specified EndpointSlice

      • PUT: replace the specified EndpointSlice

    Table 1. Global query parameters
    ParameterTypeDescription

    allowWatchBookmarks

    boolean

    allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.

    continue

    string

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”.

    This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    fieldSelector

    string

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    labelSelector

    string

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    limit

    integer

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    pretty

    string

    If ‘true’, then the output is pretty printed.

    resourceVersion

    string

    resourceVersion sets a constraint on what resource versions a request may be served from. See for details.

    Defaults to unset

    resourceVersionMatch

    string

    resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.

    Defaults to unset

    timeoutSeconds

    integer

    Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.

    watch

    boolean

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    HTTP method

    GET

    Description

    list or watch objects of kind EndpointSlice

    Table 2. HTTP responses
    HTTP codeReponse body

    200 - OK

    Table 3. Global path parameters
    ParameterTypeDescription

    namespace

    string

    object name and auth scope, such as for teams and projects

    Table 4. Global query parameters
    ParameterTypeDescription

    pretty

    string

    If ‘true’, then the output is pretty printed.

    HTTP method

    DELETE

    Description

    delete collection of EndpointSlice

    Table 6. Body parameters
    ParameterTypeDescription

    body

    DeleteOptions meta/v1

    Table 7. HTTP responses
    HTTP codeReponse body

    200 - OK

    HTTP method

    Description

    list or watch objects of kind EndpointSlice

    Table 8. Query parameters
    ParameterTypeDescription

    allowWatchBookmarks

    boolean

    allowWatchBookmarks requests watch events with type “BOOKMARK”. Servers that do not implement bookmarks may ignore this flag and bookmarks are sent at the server’s discretion. Clients should not assume bookmarks are returned at any specific interval, nor may they assume the server will send any BOOKMARK event during a session. If this is not a watch, this field is ignored. If the feature gate WatchBookmarks is not enabled in apiserver, this field is ignored.

    continue

    string

    The continue option should be set when retrieving more results from the server. Since this value is server defined, clients may only use the continue value from a previous query result with identical query parameters (except for the value of continue) and the server may reject a continue value it does not recognize. If the specified continue value is no longer valid whether due to expiration (generally five to fifteen minutes) or a configuration change on the server, the server will respond with a 410 ResourceExpired error together with a continue token. If the client needs a consistent list, it must restart their list without the continue field. Otherwise, the client may send another list request with the token received with the 410 error, the server will respond with a list starting from the next key, but from the latest snapshot, which is inconsistent from the previous list results - objects that are created, modified, or deleted after the first list request will be included in the response, as long as their keys are after the “next key”.

    This field is not supported when watch is true. Clients may start a watch from the last resourceVersion value returned by the server and not miss any modifications.

    fieldSelector

    string

    A selector to restrict the list of returned objects by their fields. Defaults to everything.

    labelSelector

    string

    A selector to restrict the list of returned objects by their labels. Defaults to everything.

    limit

    integer

    limit is a maximum number of responses to return for a list call. If more items exist, the server will set the continue field on the list metadata to a value that can be used with the same initial query to retrieve the next set of results. Setting a limit may return fewer than the requested amount of items (up to zero items) in the event all requested objects are filtered out and clients should only use the presence of the continue field to determine whether more results are available. Servers may choose not to support the limit argument and will return all of the available results. If limit is specified and the continue field is empty, clients may assume that no more results are available. This field is not supported if watch is true.

    The server guarantees that the objects returned when using continue will be identical to issuing a single list call without a limit - that is, no objects created, modified, or deleted after the first request is issued will be included in any subsequent continued requests. This is sometimes referred to as a consistent snapshot, and ensures that a client that is using limit to receive smaller chunks of a very large result can ensure they see all possible objects. If objects are updated during a chunked list the version of the object that was present at the time the first list result was calculated is returned.

    resourceVersion

    string

    resourceVersion sets a constraint on what resource versions a request may be served from. See https://kubernetes.io/docs/reference/using-api/api-concepts/#resource-versions for details.

    Defaults to unset

    resourceVersionMatch

    string

    resourceVersionMatch determines how resourceVersion is applied to list calls. It is highly recommended that resourceVersionMatch be set for list calls where resourceVersion is set See for details.

    Defaults to unset

    timeoutSeconds

    integer

    Timeout for the list/watch call. This limits the duration of the call, regardless of any activity or inactivity.

    watch

    boolean

    Watch for changes to the described resources and return them as a stream of add, update, and remove notifications. Specify resourceVersion.

    Table 9. HTTP responses
    HTTP codeReponse body

    200 - OK

    EndpointSliceList discovery.k8s.io/v1

    HTTP method

    POST

    Description

    create an EndpointSlice

    Table 10. Query parameters
    ParameterTypeDescription

    dryRun

    string

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

    fieldManager

    string

    fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by .

    Table 11. Body parameters
    ParameterTypeDescription

    body

    EndpointSlice discovery.k8s.io/v1

    Table 12. HTTP responses
    HTTP codeReponse body

    200 - OK

    Table 13. Global path parameters
    ParameterTypeDescription

    name

    string

    name of the EndpointSlice

    namespace

    string

    object name and auth scope, such as for teams and projects

    Table 14. Global query parameters
    ParameterTypeDescription

    pretty

    string

    If ‘true’, then the output is pretty printed.

    HTTP method

    DELETE

    Description

    delete an EndpointSlice

    Table 16. Body parameters
    ParameterTypeDescription

    body

    DeleteOptions meta/v1

    Table 17. HTTP responses
    HTTP codeReponse body

    200 - OK

    HTTP method

    GET

    Description

    read the specified EndpointSlice

    Table 18. HTTP responses
    HTTP codeReponse body

    200 - OK

    EndpointSlice discovery.k8s.io/v1

    HTTP method

    PATCH

    Description

    partially update the specified EndpointSlice

    Table 19. Query parameters
    ParameterTypeDescription

    dryRun

    string

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

    fieldManager

    string

    fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by . This field is required for apply requests (application/apply-patch) but optional for non-apply patch types (JsonPatch, MergePatch, StrategicMergePatch).

    force

    boolean

    Force is going to “force” Apply requests. It means user will re-acquire conflicting fields owned by other people. Force flag must be unset for non-apply patch requests.

    Table 20. Body parameters
    ParameterTypeDescription

    body

    Patch meta/v1

    Table 21. HTTP responses
    HTTP codeReponse body

    200 - OK

    HTTP method

    PUT

    Description

    replace the specified EndpointSlice

    Table 22. Query parameters
    ParameterTypeDescription

    dryRun

    string

    When present, indicates that modifications should not be persisted. An invalid or unrecognized dryRun directive will result in an error response and no further processing of the request. Valid values are: - All: all dry run stages will be processed

    fieldManager

    string

    fieldManager is a name associated with the actor or entity that is making these changes. The value must be less than or 128 characters long, and only contain printable characters, as defined by https://golang.org/pkg/unicode/#IsPrint.

    Table 23. Body parameters
    ParameterTypeDescription

    body

    Table 24. HTTP responses
    HTTP codeReponse body

    200 - OK