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}]
},
]
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 ]*
subsets.addresses ([]EndpointAddress)
提供已标记为准备就绪的相关端口的 IP 地址。这些端点应被视为负载均衡器和客户端可以安全使用的端点。
EndpointAddress 是描述单个 IP 地址的元组。
subsets.addresses.ip (string), required
此端点的 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)
可选:托管此端点的节点。这可用于确定节点本地的端点。
subsets.addresses.targetRef (ObjectReference)
对提供端点的对象的引用。
subsets.notReadyAddresses ([]EndpointAddress)
提供相关端口但当前未标记为准备就绪的 IP 地址,因为它们尚未完成启动、最近未能通过就绪检查或最近未能通过存活检查。
EndpointAddress 是描述单个 IP 地址的元组。
subsets.notReadyAddresses.ip (string), required
此端点的 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)
可选:托管此端点的节点。这可用于确定节点本地的端点。
subsets.notReadyAddresses.targetRef (ObjectReference)
对提供端点的对象的引用。
subsets.ports ([]EndpointPort)
与相关 IP 地址关联的端口号。
subsets.ports.port (int32), required
端点的端口号。
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' - HTTP/2 over cleartext,如 https://www.rfc-editor.org/rfc/rfc7540 所述
- 'kubernetes.io/ws' - WebSocket over cleartext,如 https://www.rfc-editor.org/rfc/rfc6455 所述
- 'kubernetes.io/wss' - WebSocket over TLS,如 https://www.rfc-editor.org/rfc/rfc6455 所述
其他协议应使用实现定义的前缀名称,例如 mycompany.com/my-custom-protocol。
EndpointsList
EndpointsList 是一个端点列表。
apiVersion: v1
kind: EndpointsList
metadata (ListMeta)
标准列表元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
items ([]Endpoints), required
端点列表。
操作
get
读取指定的 Endpoints
HTTP 请求
GET /api/v1/namespaces/{namespace}/endpoints/{name}
参数
name (在路径中): string, required
Endpoints 的名称
namespace (在路径中): string, required
pretty (在查询中): string
响应
200 (Endpoints): OK
401: 未授权
list
列出或观察 Endpoints 类型的对象
HTTP 请求
GET /api/v1/namespaces/{namespace}/endpoints
参数
namespace (在路径中): string, required
allowWatchBookmarks (在查询中): boolean
continue (在查询中): string
fieldSelector (在查询中): string
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
watch (在查询中): boolean
响应
200 (EndpointsList): OK
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): OK
401: 未授权
create
创建 Endpoints
HTTP 请求
POST /api/v1/namespaces/{namespace}/endpoints
参数
namespace (在路径中): string, required
body: Endpoints, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (Endpoints): OK
201 (Endpoints): 已创建
202 (Endpoints): 已接受
401: 未授权
update
替换指定的 Endpoints
HTTP 请求
PUT /api/v1/namespaces/{namespace}/endpoints/{name}
参数
name (在路径中): string, required
Endpoints 的名称
namespace (在路径中): string, required
body: Endpoints, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (Endpoints): OK
201 (Endpoints): 已创建
401: 未授权
patch
部分更新指定的 Endpoints
HTTP 请求
PATCH /api/v1/namespaces/{namespace}/endpoints/{name}
参数
name (在路径中): string, required
Endpoints 的名称
namespace (在路径中): string, required
body: Patch, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (在查询中): boolean
pretty (在查询中): string
响应
200 (Endpoints): OK
201 (Endpoints): 已创建
401: 未授权
delete
删除 Endpoints
HTTP 请求
DELETE /api/v1/namespaces/{namespace}/endpoints/{name}
参数
name (在路径中): string, required
Endpoints 的名称
namespace (在路径中): string, required
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
响应
200 (Status): OK
202 (Status): 已接受
401: 未授权
deletecollection
删除 Endpoints 的集合
HTTP 请求
DELETE /api/v1/namespaces/{namespace}/endpoints
参数
namespace (在路径中): string, required
body: DeleteOptions
continue (在查询中): string
dryRun (在查询中): string
fieldSelector (在查询中): string
gracePeriodSeconds (在查询中): integer
labelSelector (在查询中): string
limit (在查询中): integer
pretty (在查询中): string
propagationPolicy (在查询中): string
resourceVersion (在查询中): string
resourceVersionMatch (在查询中): string
sendInitialEvents (在查询中): boolean
timeoutSeconds (在查询中): integer
响应
200 (Status): OK
401: 未授权
此页面是自动生成的。
如果您打算报告此页面的问题,请在您的问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。