Endpoints
apiVersion: v1
import "k8s.io/api/core/v1"
Endpoints
Endpoints is a collection of endpoints that implement the actual service. Example:
Name: “mysvc”,
Subsets: [
{
Addresses: [{“ip”: “10.10.1.1”}, {“ip”: “10.10.2.2”}],
Ports: [{“name”: “a”, “port”: 8675}, {“name”: “b”, “port”: 309}]
},
{
Addresses: [{“ip”: “10.10.3.3”}],
Ports: [{“name”: “a”, “port”: 93}, {“name”: “b”, “port”: 76}]
},
]
-
apiVersion: v1
-
kind: Endpoints
-
metadata (ObjectMeta)
Standard object’s metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata -
subsets ([]EndpointSubset)
The set of all endpoints is the union of all subsets. Addresses are placed into subsets according to the IPs they share. A single address with multiple ports, some of which are ready and some of which are not (because they come from different containers) will result in the address being displayed in different subsets for the different ports. No address will appear in both Addresses and NotReadyAddresses in the same subset. Sets of addresses and ports that comprise a service.
EndpointSubset is a group of addresses with a common set of ports. The expanded set of endpoints is the Cartesian product of Addresses x Ports. For example, given:
- {*
- Addresses: [{“ip”: “10.10.1.1”}, {“ip”: “10.10.2.2”}],*
- Ports: [{“name”: “a”, “port”: 8675}, {“name”: “b”, “port”: 309}]*
- }*
*The resulting set of endpoints can be viewed as:* - a: [ 10.10.1.1:8675, 10.10.2.2:8675 ],*
- b: [ 10.10.1.1:309, 10.10.2.2:309 ]*
- subsets.addresses ([]EndpointAddress)
IP addresses which offer the related ports that are marked as ready. These endpoints should be considered safe for load balancers and clients to utilize.
EndpointAddress is a tuple that describes single IP address. - subsets.addresses.ip (string), required
The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready. - subsets.addresses.hostname (string)
The Hostname of this endpoint - subsets.addresses.nodeName (string)
Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. - subsets.addresses.targetRef (ObjectReference)
Reference to object providing the endpoint. - subsets.notReadyAddresses ([]EndpointAddress)
IP addresses which offer the related ports but are not currently marked as ready because they have not yet finished starting, have recently failed a readiness check, or have recently failed a liveness check.
EndpointAddress is a tuple that describes single IP address. - subsets.notReadyAddresses.ip (string), required
The IP of this endpoint. May not be loopback (127.0.0.0/8), link-local (169.254.0.0/16), or link-local multicast ((224.0.0.0/24). IPv6 is also accepted but not fully supported on all platforms. Also, certain kubernetes components, like kube-proxy, are not IPv6 ready. - subsets.notReadyAddresses.hostname (string)
The Hostname of this endpoint - subsets.notReadyAddresses.nodeName (string)
Optional: Node hosting this endpoint. This can be used to determine endpoints local to a node. - subsets.notReadyAddresses.targetRef (ObjectReference)
Reference to object providing the endpoint. - subsets.ports ([]EndpointPort)
Port numbers available on the related IP addresses.
EndpointPort is a tuple that describes a single port. - subsets.ports.port (int32), required
The port number of the endpoint. - subsets.ports.protocol (string)
The IP protocol for this port. Must be UDP, TCP, or SCTP. Default is TCP. - subsets.ports.name (string)
The name of this port. This must match the ‘name’ field in the corresponding ServicePort. Must be a DNS_LABEL. Optional only if one port is defined. - subsets.ports.appProtocol (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 http://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. This is a beta field that is guarded by the ServiceAppProtocol feature gate and enabled by default.
EndpointsList
EndpointsList is a list of endpoints.
-
apiVersion: v1
-
kind: EndpointsList
-
metadata (ListMeta)
Standard list metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds -
items ([]Endpoints), required
List of endpoints.
Operations
get
read the specified Endpoints
HTTP Request
GET /api/v1/namespaces/{namespace}/endpoints/{name}
Parameters
- {name} (string), required
name of the Endpoints - {namespace} (string), required
namespace - ?pretty (string)
pretty
Response
200 (Endpoints): OK
401: Unauthorized
list
list or watch objects of kind Endpoints
HTTP Request
GET /api/v1/namespaces/{namespace}/endpoints
Parameters
- {namespace} (string), required
namespace - ?allowWatchBookmarks (boolean)
allowWatchBookmarks - ?continue (string)
continue - ?fieldSelector (string)
fieldSelector - ?labelSelector (string)
labelSelector - ?limit (integer)
limit - ?pretty (string)
pretty - ?resourceVersion (string)
resourceVersion - ?resourceVersionMatch (string)
resourceVersionMatch - ?timeoutSeconds (integer)
timeoutSeconds - ?watch (boolean)
watch
Response
200 (EndpointsList): OK
401: Unauthorized
list
list or watch objects of kind Endpoints
HTTP Request
GET /api/v1/endpoints
Parameters
- ?allowWatchBookmarks (boolean)
allowWatchBookmarks - ?continue (string)
continue - ?fieldSelector (string)
fieldSelector - ?labelSelector (string)
labelSelector - ?limit (integer)
limit - ?pretty (string)
pretty - ?resourceVersion (string)
resourceVersion - ?resourceVersionMatch (string)
resourceVersionMatch - ?timeoutSeconds (integer)
timeoutSeconds - ?watch (boolean)
watch
Response
200 (EndpointsList): OK
401: Unauthorized
create
create Endpoints
HTTP Request
POST /api/v1/namespaces/{namespace}/endpoints
Parameters
-
{namespace} (string), required
namespace -
body (Endpoints), required
-
?dryRun (string)
dryRun -
?fieldManager (string)
fieldManager -
?pretty (string)
pretty
Response
200 (Endpoints): OK
201 (Endpoints): Created
202 (Endpoints): Accepted
401: Unauthorized
update
replace the specified Endpoints
HTTP Request
PUT /api/v1/namespaces/{namespace}/endpoints/{name}
Parameters
-
{name} (string), required
name of the Endpoints -
{namespace} (string), required
namespace -
body (Endpoints), required
-
?dryRun (string)
dryRun -
?fieldManager (string)
fieldManager -
?pretty (string)
pretty
Response
200 (Endpoints): OK
201 (Endpoints): Created
401: Unauthorized
patch
partially update the specified Endpoints
HTTP Request
PATCH /api/v1/namespaces/{namespace}/endpoints/{name}
Parameters
-
{name} (string), required
name of the Endpoints -
{namespace} (string), required
namespace -
body (Patch), required
-
?dryRun (string)
dryRun -
?fieldManager (string)
fieldManager -
?force (boolean)
force -
?pretty (string)
pretty
Response
200 (Endpoints): OK
401: Unauthorized
delete
delete Endpoints
HTTP Request
DELETE /api/v1/namespaces/{namespace}/endpoints/{name}
Parameters
-
{name} (string), required
name of the Endpoints -
{namespace} (string), required
namespace -
body (DeleteOptions)
-
?dryRun (string)
dryRun -
?gracePeriodSeconds (integer)
gracePeriodSeconds -
?pretty (string)
pretty -
?propagationPolicy (string)
propagationPolicy
Response
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection
delete collection of Endpoints
HTTP Request
DELETE /api/v1/namespaces/{namespace}/endpoints
Parameters
-
{namespace} (string), required
namespace -
body (DeleteOptions)
-
?continue (string)
continue -
?dryRun (string)
dryRun -
?fieldSelector (string)
fieldSelector -
?gracePeriodSeconds (integer)
gracePeriodSeconds -
?labelSelector (string)
labelSelector -
?limit (integer)
limit -
?pretty (string)
pretty -
?propagationPolicy (string)
propagationPolicy -
?resourceVersion (string)
resourceVersion -
?resourceVersionMatch (string)
resourceVersionMatch -
?timeoutSeconds (integer)
timeoutSeconds
Response
200 (Status): OK
401: Unauthorized