Endpoints
apiVersion: v1
import "k8s.io/api/core/v1"
Endpoints
Endpoints 是一组实现实际服务的端点集合。示例
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}] }, ]
Endpoints 是一个遗留 API,不包含所有 Service 特性的信息。请使用 discoveryv1.EndpointSlice 获取关于 Service 端点的完整信息。
已弃用:此 API 在 v1.33+ 中已弃用。请使用 discoveryv1.EndpointSlice。
apiVersion: v1
kind: Endpoints
metadata (ObjectMeta)
标准对象的元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
subsets ([]EndpointSubset)
原子性:将在合并期间被替换
所有端点的集合是所有子集的并集。地址根据它们共享的 IP 被放入子集。具有多个端口的单个地址,其中一些端口已就绪而另一些未就绪(因为它们来自不同的容器),将导致该地址针对不同的端口显示在不同的子集中。在同一个子集中,任何地址都不会同时出现在 Addresses 和 NotReadyAddresses 中。构成服务的地址和端口集合。
*EndpointSubset 是一组具有共同端口集的地址。扩展的端点集是 Addresses x Ports 的笛卡尔积。例如,给定
{ Addresses: [{"ip": "10.10.1.1"}, {"ip": "10.10.2.2"}], Ports: [{"name": "a", "port": 8675}, {"name": "b", "port": 309}] }
结果端点集可以视为
a: [ 10.10.1.1:8675, 10.10.2.2:8675 ], b: [ 10.10.1.1:309, 10.10.2.2:309 ]
已弃用:此 API 在 v1.33+ 中已弃用。*
subsets.addresses ([]EndpointAddress)
原子性:将在合并期间被替换
提供相关端口并被标记为就绪的 IP 地址。这些端点应被视为对负载均衡器和客户端是安全的。
*EndpointAddress 是描述单个 IP 地址的元组。已弃用:此 API 在 v1.33+ 中已弃用。*
subsets.addresses.ip (string),必需
此端点的 IP 地址。不能是回环地址 (127.0.0.0/8 或 ::1)、链接本地地址 (169.254.0.0/16 或 fe80::/10) 或链接本地多播地址 (224.0.0.0/24 或 ff02::/16)。
subsets.addresses.hostname (string)
此端点的主机名
subsets.addresses.nodeName (string)
可选:托管此端点的 Node。这可用于确定 Node 本地的端点。
subsets.addresses.targetRef (ObjectReference)
引用提供端点的对象。
subsets.notReadyAddresses ([]EndpointAddress)
原子性:将在合并期间被替换
提供相关端口但当前未标记为就绪的 IP 地址,原因可能是它们尚未完成启动、最近未能通过就绪性检查或最近未能通过存活度检查。
*EndpointAddress 是描述单个 IP 地址的元组。已弃用:此 API 在 v1.33+ 中已弃用。*
subsets.notReadyAddresses.ip (string),必需
此端点的 IP 地址。不能是回环地址 (127.0.0.0/8 或 ::1)、链接本地地址 (169.254.0.0/16 或 fe80::/10) 或链接本地多播地址 (224.0.0.0/24 或 ff02::/16)。
subsets.notReadyAddresses.hostname (string)
此端点的主机名
subsets.notReadyAddresses.nodeName (string)
可选:托管此端点的 Node。这可用于确定 Node 本地的端点。
subsets.notReadyAddresses.targetRef (ObjectReference)
引用提供端点的对象。
subsets.ports ([]EndpointPort)
原子性:将在合并期间被替换
相关 IP 地址上可用的端口号。
*EndpointPort 是描述单个端口的元组。已弃用:此 API 在 v1.33+ 中已弃用。*
subsets.ports.port (int32),必需
端点的端口号。
subsets.ports.protocol (string)
此端口的 IP 协议。必须是 UDP、TCP 或 SCTP。默认为 TCP。
subsets.ports.name (string)
此端口的名称。此名称必须与对应 ServicePort 中的“name”字段匹配。必须是 DNS_LABEL。仅在定义一个端口时可选。
subsets.ports.appProtocol (string)
此端口的应用协议。这用作实现的提示,以便为它们理解的协议提供更丰富的行为。此字段遵循标准 Kubernetes 标签语法。有效值可以是
无前缀协议名称 - 保留用于 IANA 标准服务名称(根据 RFC-6335 和 https://www.iana.org/assignments/service-names))。
Kubernetes 定义的前缀名称
- 'kubernetes.io/h2c' - 如 https://www.rfc-editor.org/rfc/rfc9113.html#name-starting-http-2-with-prior- 中所述的明文 HTTP/2 先验知识
- 'kubernetes.io/ws' - 如 https://www.rfc-editor.org/rfc/rfc6455 中所述的明文 WebSocket
- 'kubernetes.io/wss' - 如 https://www.rfc-editor.org/rfc/rfc6455 中所述的基于 TLS 的 WebSocket
其他协议应使用实现定义的前缀名称,例如 mycompany.com/my-custom-protocol。
EndpointsList
EndpointsList 是端点列表。已弃用:此 API 在 v1.33+ 中已弃用。
apiVersion: v1
kind: EndpointsList
metadata (ListMeta)
标准列表元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
items ([]Endpoints),必需
端点列表。
操作
get
读取指定的 Endpoints
HTTP 请求
GET /api/v1/namespaces/{namespace}/endpoints/{name}
参数
响应
200 (Endpoints):成功
401:未授权
list
列出或监视 Endpoints 类型的对象
HTTP 请求
GET /api/v1/namespaces/{namespace}/endpoints
参数
namespace (在路径中):string,必需
allowWatchBookmarks (在查询中):boolean
continue (在查询中):string
fieldSelector (在查询中):string
labelSelector (在查询中):string
limit (在查询中):integer
pretty (在查询中):string
resourceVersion (在查询中):string
resourceVersionMatch (在查询中):string
sendInitialEvents (在查询中):boolean
timeoutSeconds (在查询中):integer
watch (在查询中):boolean
响应
200 (EndpointsList):成功
401:未授权
list
列出或监视 Endpoints 类型的对象
HTTP 请求
GET /api/v1/endpoints
参数
allowWatchBookmarks (在查询中):boolean
continue (在查询中):string
fieldSelector (在查询中):string
labelSelector (在查询中):string
limit (在查询中):integer
pretty (在查询中):string
resourceVersion (在查询中):string
resourceVersionMatch (在查询中):string
sendInitialEvents (在查询中):boolean
timeoutSeconds (在查询中):integer
watch (在查询中):boolean
响应
200 (EndpointsList):成功
401:未授权
create
创建 Endpoints
HTTP 请求
POST /api/v1/namespaces/{namespace}/endpoints
参数
namespace (在路径中):string,必需
body:Endpoints,必需
dryRun (在查询中):string
fieldManager (在查询中):string
fieldValidation (在查询中):string
pretty (在查询中):string
响应
200 (Endpoints):成功
201 (Endpoints):已创建
202 (Endpoints):已接受
401:未授权
update
替换指定的 Endpoints
HTTP 请求
PUT /api/v1/namespaces/{namespace}/endpoints/{name}
参数
name (在路径中):string,必需
Endpoints 的名称
namespace (在路径中):string,必需
body:Endpoints,必需
dryRun (在查询中):string
fieldManager (在查询中):string
fieldValidation (在查询中):string
pretty (在查询中):string
响应
200 (Endpoints):成功
201 (Endpoints):已创建
401:未授权
patch
部分更新指定的 Endpoints
HTTP 请求
PATCH /api/v1/namespaces/{namespace}/endpoints/{name}
参数
name (在路径中):string,必需
Endpoints 的名称
namespace (在路径中):string,必需
body:Patch,必需
dryRun (在查询中):string
fieldManager (在查询中):string
fieldValidation (在查询中):string
force (在查询中):boolean
pretty (在查询中):string
响应
200 (Endpoints):成功
201 (Endpoints):已创建
401:未授权
delete
删除 Endpoints
HTTP 请求
DELETE /api/v1/namespaces/{namespace}/endpoints/{name}
参数
name (在路径中):string,必需
Endpoints 的名称
namespace (在路径中):string,必需
body:DeleteOptions
dryRun (在查询中):string
gracePeriodSeconds (在查询中):integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询中):boolean
pretty (在查询中):string
propagationPolicy (在查询中):string
响应
200 (Status):成功
202 (Status):已接受
401:未授权
deletecollection
删除 Endpoints 集合
HTTP 请求
DELETE /api/v1/namespaces/{namespace}/endpoints
参数
namespace (在路径中):string,必需
body:DeleteOptions
continue (在查询中):string
dryRun (在查询中):string
fieldSelector (在查询中):string
gracePeriodSeconds (在查询中):integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询中):boolean
labelSelector (在查询中):string
limit (在查询中):integer
pretty (在查询中):string
propagationPolicy (在查询中):string
resourceVersion (在查询中):string
resourceVersionMatch (在查询中):string
sendInitialEvents (在查询中):boolean
timeoutSeconds (在查询中):integer
响应
200 (Status):成功
401:未授权
此页面为自动生成。
如果你打算报告此页面的问题,请在问题描述中说明该页面是自动生成的。修复可能需要在 Kubernetes 项目中的其他位置进行。