集群资源

1 - APIService

APIService 是用来表示一个特定的 GroupVersion 的服务器

apiVersion: apiregistration.k8s.io/v1

import "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1"

APIService

APIService 是用来表示一个特定的 GroupVersion 的服务器。名称必须为 "version.group"。


APIServiceSpec

APIServiceSpec 包含用于定位和与服务器通信的信息。仅支持 HTTPS 协议,但是你可以禁用证书验证。


APIServiceStatus

APIServiceStatus 包含有关 API 服务器的派生信息


APIServiceList

APIServiceList 是 APIService 对象的列表。


Operations


get 读取指定的 APIService

HTTP 请求

GET /apis/apiregistration.k8s.io/v1/apiservices/{name}

参数

响应

200 (APIService): OK

401: Unauthorized

get 读取指定 APIService 的状态

HTTP 请求

GET /apis/apiregistration.k8s.io/v1/apiservices/{name}/status

参数

响应

200 (APIService): OK

401: Unauthorized

list 列出或观察 APIService 类的对象

HTTP 请求

GET /apis/apiregistration.k8s.io/v1/apiservices

参数

响应

200 (APIServiceList): OK

401: Unauthorized

create 创建一个 APIService

HTTP 请求

POST /apis/apiregistration.k8s.io/v1/apiservices

参数

响应

200 (APIService): OK

201 (APIService): Created

202 (APIService): Accepted

401: Unauthorized

update 替换指定的 APIService

HTTP 请求

PUT /apis/apiregistration.k8s.io/v1/apiservices/{name}

参数

响应

200 (APIService): OK

201 (APIService): Created

401: Unauthorized

update 替换指定 APIService 的 status

HTTP 请求

PUT /apis/apiregistration.k8s.io/v1/apiservices/{name}/status

参数

响应

200 (APIService): OK

201 (APIService): Created

401: Unauthorized

patch 部分更新指定的 APIService

HTTP 请求

PATCH /apis/apiregistration.k8s.io/v1/apiservices/{name}

参数

响应

200 (APIService): OK

201 (APIService): Created

401: Unauthorized

patch 部分更新指定 APIService 的 status

HTTP 请求

PATCH /apis/apiregistration.k8s.io/v1/apiservices/{name}/status

参数

响应

200 (APIService): OK

201 (APIService): Created

401: Unauthorized

delete 删除一个 APIService

HTTP 请求

DELETE /apis/apiregistration.k8s.io/v1/apiservices/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 APIService 集合

HTTP 请求

DELETE /apis/apiregistration.k8s.io/v1/apiservices

参数

响应

200 (Status): OK

401: Unauthorized

2 - ComponentStatus

ComponentStatus(和 ComponentStatusList)保存集群检验信息。

apiVersion: v1

import "k8s.io/api/core/v1"

ComponentStatus

ComponentStatus(和 ComponentStatusList)保存集群检验信息。 已废弃:该 API 在 v1.19 及更高版本中废弃。


ComponentStatusList

作为 ComponentStatus 对象列表,所有组件状况的状态。 已废弃:该 API 在 v1.19 及更高版本中废弃。


操作


get 读取指定的 ComponentStatus

HTTP 请求

GET /api/v1/componentstatuses/{name}

参数

响应

200 (ComponentStatus): OK

401: Unauthorized

list 列出 ComponentStatus 类别的对象

HTTP 请求

GET /api/v1/componentstatuses

参数

响应

200 (ComponentStatusList): OK

401: Unauthorized

3 - Event

Event 是集群中某个事件的报告。

apiVersion: events.k8s.io/v1

import "k8s.io/api/events/v1"

Event

Event 是集群中某个事件的报告。它一般表示系统的某些状态变化。 Event 的保留时间有限,触发器和消息可能会随着时间的推移而演变。 事件消费者不应假定给定原因的事件的时间所反映的是一致的下层触发因素,或具有该原因的事件的持续存在。 Events 应被视为通知性质的、尽最大努力而提供的补充数据。


EventList

EventList 是一个 Event 对象列表。


操作


get 读取特定 Event

HTTP 请求

GET /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}

参数

响应

200 (Event): OK

401: Unauthorized

list 列出或观察事件类型对象

HTTP 请求

GET /apis/events.k8s.io/v1/namespaces/{namespace}/events

参数

响应

200 (EventList): OK

401: Unauthorized

list 列出或观察事件类型对象

HTTP 请求

GET /apis/events.k8s.io/v1/events

参数

响应

200 (EventList): OK

401: Unauthorized

create 创建一个 Event

HTTP 请求

POST /apis/events.k8s.io/v1/namespaces/{namespace}/events

参数

响应

200 (Event): OK

201 (Event): Created

202 (Event): Accepted

401: Unauthorized

update 替换指定 Event

HTTP 请求

PUT /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}

参数

响应

200 (Event): OK

201 (Event): Created

401: Unauthorized

patch 部分更新指定的 Event

HTTP 请求

PATCH /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}

参数

响应

200 (Event): OK

201 (Event): Created

401: Unauthorized

delete 删除 Event

HTTP 请求

DELETE /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 Event 集合

HTTP 请求

DELETE /apis/events.k8s.io/v1/namespaces/{namespace}/events

参数

响应

200 (Status): OK

401: Unauthorized

4 - IPAddress

IPAddress 表示单个 IP 族的单个 IP。

apiVersion: networking.k8s.io/v1

import "k8s.io/api/networking/v1"

IPAddress

IPAddress 表示单个 IP 族的单个 IP。此对象旨在供操作 IP 地址的 API 使用。 此对象由 Service 核心 API 用于分配 IP 地址。 IP 地址可以用不同的格式表示,为了保证 IP 地址的唯一性,此对象的名称是格式规范的 IP 地址。 IPv4 地址由点分隔的四个十进制数字组成,前导零可省略;IPv6 地址按照 RFC 5952 的定义来表示。 有效值:192.168.1.5、2001:db8::1 或 2001:db8:aaaa:bbbb:cccc:dddd:eeee:1。 无效值:10.01.2.3 或 2001:db8:0:0:0::1。


IPAddressSpec

IPAddressSpec 描述 IP 地址中的属性。


IPAddressList

IPAddressList 包含 IPAddress 的列表。


操作


get 读取指定的 IPAddress

HTTP 请求

GET /apis/networking.k8s.io/v1/ipaddresses/{name}

参数

响应

200 (IPAddress): OK

401: Unauthorized

list 列举或监视类别为 IPAddress 的对象

HTTP 请求

GET /apis/networking.k8s.io/v1/ipaddresses

参数

响应

200 (IPAddressList): OK

401: Unauthorized

create 创建 IPAddress

HTTP 请求

POST /apis/networking.k8s.io/v1/ipaddresses

参数

响应

200 (IPAddress): OK

201 (IPAddress): Created

202 (IPAddress): Accepted

401: Unauthorized

update 替换指定的 IPAddress

HTTP 请求

PUT /apis/networking.k8s.io/v1/ipaddresses/{name}

参数

响应

200 (IPAddress): OK

201 (IPAddress): Created

401: Unauthorized

patch 部分更新指定的 IPAddress

HTTP 请求

PATCH /apis/networking.k8s.io/v1/ipaddresses/{name}

参数

响应

200 (IPAddress): OK

201 (IPAddress): Created

401: Unauthorized

delete 删除 IPAddress

HTTP 请求

DELETE /apis/networking.k8s.io/v1/ipaddresses/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 IPAddress 的集合

HTTP 请求

DELETE /apis/networking.k8s.io/v1/ipaddresses

参数

响应

200 (Status): OK

401: Unauthorized

5 - Lease

Lease 定义了租约的概念。

apiVersion: coordination.k8s.io/v1

import "k8s.io/api/coordination/v1"

Lease

Lease 定义了租约的概念。


LeaseSpec

LeaseSpec 是 Lease 的规约。


LeaseList

LeaseList 是 Lease 对象的列表。


操作


get 读取指定的 Lease

HTTP 请求

GET /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}

参数

响应

200 (Lease): OK

401: Unauthorized

list 列出或监视类别为 Lease 的对象

HTTP 请求

GET /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases

参数

响应

200 (LeaseList): OK

401: Unauthorized

list 列出或监视类别为 Lease 的对象

HTTP 请求

GET /apis/coordination.k8s.io/v1/leases

参数

响应

200 (LeaseList): OK

401: Unauthorized

create 创建 Lease

HTTP 请求

POST /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases

参数

响应

200 (Lease): OK

201 (Lease): Created

202 (Lease): Accepted

401: Unauthorized

update 替换指定的 Lease

HTTP 请求

PUT /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}

参数

响应

200 (Lease): OK

201 (Lease): Created

401: Unauthorized

patch 部分更新指定的 Lease

HTTP 请求

PATCH /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}

参数

响应

200 (Lease): OK

201 (Lease): Created

401: Unauthorized

delete 删除 Lease

HTTP 请求

DELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 Lease 收款

HTTP 请求

DELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases

参数

响应

200 (Status): OK

401: Unauthorized

6 - LeaseCandidate v1beta1

LeaseCandidate 定义 Lease 对象的候选者。

apiVersion: coordination.k8s.io/v1beta1

import "k8s.io/api/coordination/v1beta1"

LeaseCandidate

LeaseCandidate 定义一个 Lease 对象的候选者。 通过创建候选者,协同式领导者选举能够从候选者列表中选出最佳的领导者。


LeaseCandidateSpec

LeaseCandidateSpec 是 Lease 的规约。


pingTime 是服务器最近一次请求 LeaseCandidate 续订的时间。 此操作仅在领导者选举期间进行,用以检查是否有 LeaseCandidates 变得不合格。 当 pingTime 更新时,LeaseCandidate 会通过更新 renewTime 来响应。

MicroTime 是微秒级精度的 Time 版本

LeaseCandidateList

LeaseCandidateList 是 Lease 对象的列表。


操作


get 读取指定的 LeaseCandidate

HTTP 请求

GET /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}

参数

响应

200 (LeaseCandidate): OK

401: Unauthorized

list 列举或监视类别为 LeaseCandidate 的对象

HTTP 请求

GET /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates

参数

响应

200 (LeaseCandidateList): OK

401: Unauthorized

list 列举或监视类别为 LeaseCandidate 的对象

HTTP 请求

GET /apis/coordination.k8s.io/v1beta1/leasecandidates

参数

响应

200 (LeaseCandidateList): OK

401: Unauthorized

create 创建 LeaseCandidate

HTTP 请求

POST /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates

参数

响应

200 (LeaseCandidate): OK

201 (LeaseCandidate): Created

202 (LeaseCandidate): Accepted

401: Unauthorized

update 替换指定的 LeaseCandidate

HTTP 请求

PUT /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}

参数

响应

200 (LeaseCandidate): OK

201 (LeaseCandidate): Created

401: Unauthorized

patch 部分更新指定的 LeaseCandidate

HTTP 请求

PATCH /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}

参数

响应

200 (LeaseCandidate): OK

201 (LeaseCandidate): Created

401: Unauthorized

delete 删除 LeaseCandidate

HTTP 请求

DELETE /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 LeaseCandidate 的集合

HTTP 请求

DELETE /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates

参数

响应

200 (Status): OK

401: Unauthorized

7 - Namespace

Namespace 为名字提供作用域。

apiVersion: v1

import "k8s.io/api/core/v1"

Namespace

Namespace 为名字提供作用域。使用多个命名空间是可选的。


NamespaceSpec

NamespaceSpec 用于描述 Namespace 的属性。


NamespaceStatus

NamespaceStatus 表示 Namespace 的当前状态信息。


NamespaceList

NamespaceList 是一个命名空间列表。


操作


get 读取指定的 Namespace

HTTP 请求

GET /api/v1/namespaces/{name}

参数

响应

200 (Namespace):OK

401:Unauthorized

get 读取指定 Namespace 的状态

HTTP 请求

GET /api/v1/namespaces/{name}/status

参数

响应

200 (Namespace):OK

401:Unauthorized

list 列出或者检查类别为 Namespace 的对象

HTTP 请求

GET /api/v1/namespaces

参数

响应

200 (NamespaceList):OK

401:Unauthorized

create 创建一个 Namespace

HTTP 请求

POST /api/v1/namespaces

参数

响应

200 (Namespace):OK

201 (Namespace):Created

202 (Namespace):Accepted

401:Unauthorized

update 替换指定的 Namespace

HTTP 请求

PUT /api/v1/namespaces/{name}

参数

响应

200 (Namespace):OK

201 (Namespace):Created

401:Unauthorized

update 替换指定 Namespace 的终结器

HTTP 请求

PUT /api/v1/namespaces/{name}/finalize

参数

响应

200 (Namespace):OK

201 (Namespace):Created

401:Unauthorized

update 替换指定 Namespace 的状态

HTTP 请求

PUT /api/v1/namespaces/{name}/status

参数

响应

200 (Namespace):OK

201 (Namespace):Created

401: Unauthorized

patch 部分更新指定的 Namespace

HTTP 请求

PATCH /api/v1/namespaces/{name}

参数

响应

200 (Namespace):OK

201 (Namespace):Created

401: Unauthorized

patch 部分更新指定 Namespace 的状态

HTTP 请求

PATCH /api/v1/namespaces/{name}/status

参数

响应

200 (Namespace):OK

201 (Namespace):Created

401:Unauthorized

delete 删除一个 Namespace

HTTP 请求

DELETE /api/v1/namespaces/{name}

参数

响应

200 (Status):OK

202 (Status):Accepted

401:Unauthorized

8 - Node

Node 是 Kubernetes 中的工作节点。

apiVersion: v1

import "k8s.io/api/core/v1"

Node

Node 是 Kubernetes 中的工作节点。 每个节点在缓存中(即在 etcd 中)都有一个唯一的标识符。


NodeSpec

NodeSpec 描述了创建节点时使用的属性。


NodeStatus

NodeStatus 是有关节点当前状态的信息。


NodeList

NodeList 是已注册到 master 的所有节点的完整列表。


操作


get 读取指定节点

HTTP 请求

GET /api/v1/nodes/{name}

参数

响应

200 (Node): OK

401: Unauthorized

get 读取指定节点的状态

HTTP 请求

GET /api/v1/nodes/{name}/status

参数

响应

200 (Node): OK

401: Unauthorized

list 列出或监视节点类型的对象

HTTP 请求

GET /api/v1/nodes

参数

响应

200 (NodeList): OK

401: Unauthorized

create 创建一个节点

HTTP 请求

POST /api/v1/nodes

参数

响应

200 (Node): OK

201 (Node): Created

202 (Node): Accepted

401: Unauthorized

update 替换指定节点

HTTP 请求

PUT /api/v1/nodes/{name}

参数

响应

200 (Node): OK

201 (Node): Created

401: Unauthorized

update 替换指定节点的状态

HTTP 请求

PUT /api/v1/nodes/{name}/status

参数

响应

200 (Node): OK

201 (Node): Created

401: Unauthorized

patch 部分更新指定节点

HTTP 请求

PATCH /api/v1/nodes/{name}

参数

响应

200 (Node): OK

201 (Node): Created

401: Unauthorized

patch 部分更新指定节点的状态

HTTP 请求

PATCH /api/v1/nodes/{name}/status

参数

响应

200 (Node): OK

201 (Node): Created

401: Unauthorized

delete 删除一个节点

HTTP 请求

DELETE /api/v1/nodes/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除节点的集合

HTTP 请求

DELETE /api/v1/nodes

响应

200 (Status): OK

401: Unauthorized

9 - RuntimeClass

RuntimeClass 定义集群中支持的容器运行时类。

apiVersion: node.k8s.io/v1

import "k8s.io/api/node/v1"

RuntimeClass

RuntimeClass 定义集群中支持的容器运行时类。 RuntimeClass 用于确定哪个容器运行时用于运行某 Pod 中的所有容器。 RuntimeClass 由用户或集群制备程序手动定义,并在 PodSpec 中引用。 kubelet 负责在运行 Pod 之前解析 RuntimeClassName 引用。 有关更多详细信息,请参阅 https://kubernetes.io/zh-cn/docs/concepts/containers/runtime-class/


RuntimeClassList

RuntimeClassList 是 RuntimeClass 对象的列表。


操作


get 读取指定的 RuntimeClass

HTTP 请求

GET /apis/node.k8s.io/v1/runtimeclasses/{name}

参数

响应

200 (RuntimeClass): OK

401: Unauthorized

list 列出或监视 RuntimeClass 类别的对象

HTTP 请求

GET /apis/node.k8s.io/v1/runtimeclasses

参数

响应

200 (RuntimeClassList): OK

401: Unauthorized

create 创建 RuntimeClass

HTTP 请求

POST /apis/node.k8s.io/v1/runtimeclasses

参数

响应

200 (RuntimeClass): OK

201 (RuntimeClass): Created

202 (RuntimeClass): Accepted

401: Unauthorized

update 替换指定的 RuntimeClass

HTTP 请求

PUT /apis/node.k8s.io/v1/runtimeclasses/{name}

参数

响应

200 (RuntimeClass): OK

201 (RuntimeClass): Created

401: Unauthorized

patch 部分更新指定的 RuntimeClass

HTTP 请求

PATCH /apis/node.k8s.io/v1/runtimeclasses/{name}

参数

响应

200 (RuntimeClass): OK

201 (RuntimeClass): Created

401: Unauthorized

delete 删除 RuntimeClass

HTTP 请求

DELETE /apis/node.k8s.io/v1/runtimeclasses/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 RuntimeClass 的集合

HTTP 请求

DELETE /apis/node.k8s.io/v1/runtimeclasses

参数

响应

200 (Status): OK

401: Unauthorized

10 - ServiceCIDR

ServiceCIDR 使用 CIDR 格式定义 IP 地址的范围

apiVersion: networking.k8s.io/v1

import "k8s.io/api/networking/v1"

ServiceCIDR

ServiceCIDR 使用 CIDR 格式定义 IP 地址的范围(例如 192.168.0.0/24 或 2001:db2::/64)。 此范围用于向 Service 对象分配 ClusterIP。


ServiceCIDRSpec

ServiceCIDRSpec 定义用户想要为 Service 分配 ClusterIP 所用的 CIDR。


ServiceCIDRStatus

ServiceCIDRStatus 描述 ServiceCIDR 的当前状态。


ServiceCIDRList

ServiceCIDRList 包含 ServiceCIDR 对象的列表。


操作


get 读取指定的 ServiceCIDR

HTTP

GET /apis/networking.k8s.io/v1/servicecidrs/{name}

参数

响应

200 (ServiceCIDR): OK

401: Unauthorized

get 读取指定的 ServiceCIDR 的状态

HTTP 请求

GET /apis/networking.k8s.io/v1/servicecidrs/{name}/status

参数

响应

200 (ServiceCIDR): OK

401: Unauthorized

list 列举或监视 ServiceCIDR 类别的对象

HTTP 请求

GET /apis/networking.k8s.io/v1/servicecidrs

参数

响应

200 (ServiceCIDRList): OK

401: Unauthorized

create 创建 ServiceCIDR

HTTP 请求

POST /apis/networking.k8s.io/v1/servicecidrs

参数

响应

200 (ServiceCIDR): OK

201 (ServiceCIDR): Created

202 (ServiceCIDR): Accepted

401: Unauthorized

update 替换指定的 ServiceCIDR

HTTP 请求

PUT /apis/networking.k8s.io/v1/servicecidrs/{name}

参数

响应

200 (ServiceCIDR): OK

201 (ServiceCIDR): Created

401: Unauthorized

update 替换指定的 ServiceCIDR 的状态

HTTP 请求

PUT /apis/networking.k8s.io/v1/servicecidrs/{name}/status

参数

响应

200 (ServiceCIDR): OK

201 (ServiceCIDR): Created

401: Unauthorized

patch 部分更新指定的 ServiceCIDR

HTTP 请求

PATCH /apis/networking.k8s.io/v1/servicecidrs/{name}

参数

响应

200 (ServiceCIDR): OK

201 (ServiceCIDR): Created

401: Unauthorized

patch 部分更新指定的 ServiceCIDR 的状态

HTTP 请求

PATCH /apis/networking.k8s.io/v1/servicecidrs/{name}/status

参数

响应

200 (ServiceCIDR): OK

201 (ServiceCIDR): Created

401: Unauthorized

delete 删除 ServiceCIDR

HTTP 请求

DELETE /apis/networking.k8s.io/v1/servicecidrs/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 ServiceCIDR 的集合

HTTP 请求

DELETE /apis/networking.k8s.io/v1/servicecidrs

参数

响应

200 (Status): OK

401: Unauthorized