工作负载资源

1 - Pod

Pod 是可以在主机上运行的容器的集合。

apiVersion: v1

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

Pod

Pod 是可以在主机上运行的容器的集合。此资源由客户端创建并调度到主机上。


PodSpec

PodSpec 是对 Pod 的描述。


容器

调度

生命周期

主机名和名称解析

主机名字空间

服务账号

安全上下文

Alpha 级别

resourceClaims 定义了在允许 Pod 启动之前必须分配和保留哪些 ResourceClaims。 这些资源将可供那些按名称使用它们的容器使用。

这是一个 Alpha 特性的字段,需要启用 DynamicResourceAllocation 特性门控来开启此功能。

此字段不可变更。

PodResourceClaim 通过 ClaimSource 引用一个 ResourceClaim。 它为 ClaimSource 添加一个名称,作为 Pod 内 ResourceClaim 的唯一标识。 需要访问 ResourceClaim 的容器可使用此名称引用它。

已弃用

容器

要在 Pod 中运行的单个应用容器。


镜像

Entrypoint

端口

环境变量

资源

生命周期

安全上下文

调试

EphemeralContainer

EphemeralContainer 是一个临时容器,你可以将其添加到现有 Pod 以用于用户发起的活动,例如调试。 临时容器没有资源或调度保证,它们在退出或 Pod 被移除或重新启动时不会重新启动。 如果临时容器导致 Pod 超出其资源分配,kubelet 可能会驱逐 Pod。

要添加临时容器,请使用现有 Pod 的 ephemeralcontainers 子资源。临时容器不能被删除或重新启动。


镜像

入口点

环境变量

生命周期

调试

安全上下文

不允许

LifecycleHandler

LifecycleHandler 定义了应在生命周期挂钩中执行的特定操作。 必须指定一个且只能指定一个字段,tcpSocket 除外。


NodeAffinity

节点亲和性是一组节点亲和性调度规则。


PodAffinity

Pod 亲和性是一组 Pod 间亲和性调度规则。


PodAntiAffinity

Pod 反亲和性是一组 Pod 间反亲和性调度规则。


探针

探针描述了要对容器执行的健康检查,以确定它是否处于活动状态或准备好接收流量。


PodStatus

PodStatus 表示有关 Pod 状态的信息。状态内容可能会滞后于系统的实际状态, 尤其是在托管 Pod 的节点无法联系控制平面的情况下。


PodList

PodList 是 Pod 的列表。


操作


get 读取指定的 Pod

HTTP 请求

GET /api/v1/namespaces/{namespace}/pods/{name}

参数

响应

200 (Pod): OK

401: Unauthorized

get 读取指定 Pod 的 ephemeralcontainers

HTTP 请求

GET /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers

参数

响应

200 (Pod): OK

401: Unauthorized

get 读取指定 Pod 的日志

HTTP 请求

GET /api/v1/namespaces/{namespace}/pods/{name}/log

参数

响应

200 (string): OK

401: Unauthorized

get 读取指定 Pod 的状态

HTTP 请求

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

参数

响应

200 (Pod): OK

401: Unauthorized

list 列出或观察 Pod 种类的对象

HTTP 请求

GET /api/v1/namespaces/{namespace}/pods

参数

响应

200 (PodList): OK

401: Unauthorized

list 列出或观察 Pod 种类的对象

HTTP 请求

GET /api/v1/pods

参数

响应

200 (PodList): OK

401: Unauthorized

create 创建一个 Pod

HTTP 请求

POST /api/v1/namespaces/{namespace}/pods

参数

响应

200 (Pod): OK

201 (Pod): Created

202 (Pod): Accepted

401: Unauthorized

update 替换指定的 Pod

HTTP 请求

PUT /api/v1/namespaces/{namespace}/pods/{name}

参数

响应

200 (Pod): OK

201 (Pod): Created

401: Unauthorized

update 替换指定 Pod 的 ephemeralcontainers

HTTP 请求

PUT /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers

参数

响应

200 (Pod): OK

201 (Pod): Created

401: Unauthorized

update 替换指定 Pod 的状态

HTTP 请求

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

参数

响应

200 (Pod): OK

201 (Pod): Created

401: Unauthorized

patch 部分更新指定 Pod

HTTP 请求

PATCH /api/v1/namespaces/{namespace}/pods/{name}

参数

响应

200 (Pod): OK

201 (Pod): Created

401: Unauthorized

patch 部分更新指定 Pod 的 ephemeralcontainers

HTTP 请求

PATCH /api/v1/namespaces/{namespace}/pods/{name}/ephemeralcontainers

参数

响应

200 (Pod): OK

201 (Pod): Created

401: Unauthorized

patch 部分更新指定 Pod 的状态

HTTP 请求

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

参数

响应

200 (Pod): OK

201 (Pod): Created

401: Unauthorized

delete 删除一个 Pod

HTTP 请求

DELETE /api/v1/namespaces/{namespace}/pods/{name}

参数

响应

200 (Pod): OK

202 (Pod): Accepted

401: Unauthorize

deletecollection 删除 Pod 的集合

HTTP 请求

DELETE /api/v1/namespaces/{namespace}/pods

参数

响应

200 (Status): OK

401: Unauthorized

2 - Binding

Binding 将一个对象与另一个对象绑定起来;例如,调度程序将一个 Pod 绑定到一个节点。

apiVersion: v1

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

Binding

Binding 将一个对象与另一个对象绑定在一起;例如,调度程序将一个 Pod 绑定到一个节点。


操作


create 创建 Binding

POST /api/v1/namespaces/{namespace}/bindings

参数

响应

200 (Binding): OK

201 (Binding): Created

202 (Binding): Accepted

401: Unauthorized

create 创建 Pod 的 binding

POST /api/v1/namespaces/{namespace}/pods/{name}/binding

参数

响应

200 (Binding): OK

201 (Binding): Created

202 (Binding): Accepted

401: Unauthorized

3 - PodTemplate

PodTemplate 描述一种模板,用来为预定义的 Pod 生成副本。

apiVersion: v1

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

PodTemplate

PodTemplate 描述一种模板,用来为预定义的 Pod 生成副本。


PodTemplateSpec

PodTemplateSpec 描述基于某模板所创建的 Pod 所应具有的数据。


PodTemplateList

PodTemplateList 是 PodTemplate 对象的列表。


操作


get 读取指定的 PodTemplate

HTTP 请求

GET /api/v1/namespaces/{namespace}/podtemplates/{name}

参数

响应

200 (PodTemplate): OK

401: Unauthorized

list 列出或监视 PodTemplate 类型的对象

HTTP 请求

GET /api/v1/namespaces/{namespace}/podtemplates

参数

响应

200 (PodTemplateList): OK

401: Unauthorized

list 列出或监视 PodTemplate 类型的对象

HTTP 请求

GET /api/v1/podtemplates

参数

响应

200 (PodTemplateList): OK

401: Unauthorized

create 创建一个 PodTemplate

HTTP 请求

POST /api/v1/namespaces/{namespace}/podtemplates

参数

响应

200 (PodTemplate): OK

201 (PodTemplate): Created

202 (PodTemplate): Accepted

401: Unauthorized

update 替换指定的 PodTemplate

HTTP 请求

PUT /api/v1/namespaces/{namespace}/podtemplates/{name}

参数

响应

200 (PodTemplate): OK

201 (PodTemplate): Created

401: Unauthorized

patch 部分更新指定的 PodTemplate

HTTP 请求

PATCH /api/v1/namespaces/{namespace}/podtemplates/{name}

参数

响应

200 (PodTemplate): OK

201 (PodTemplate): Created

401: Unauthorized

delete 删除一个 PodTemplate

HTTP 请求

DELETE /api/v1/namespaces/{namespace}/podtemplates/{name}

参数

响应

200 (PodTemplate): OK

202 (PodTemplate): Accepted

401: Unauthorized

deletecollection 删除 PodTemplate 的集合

HTTP 请求

DELETE /api/v1/namespaces/{namespace}/podtemplates

参数

响应

200 (Status): OK

401: Unauthorized

4 - ReplicaSet

ReplicaSet 确保在任何给定的时刻都在运行指定数量的 Pod 副本。

apiVersion: apps/v1

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

ReplicaSet

ReplicaSet 确保在任何给定的时刻都在运行指定数量的 Pod 副本。


ReplicaSetSpec

ReplicaSetSpec 是 ReplicaSet 的规约。


ReplicaSetStatus

ReplicaSetStatus 表示 ReplicaSet 的当前状态。


ReplicaSetList

ReplicaSetList 是多个 ReplicaSet 的集合。


操作


get 读取指定的 ReplicaSet

HTTP 请求

GET /apis/apps/v1/namespaces/{namespace}/replicasets/{name}

参数

响应

200 (ReplicaSet): OK

401: Unauthorized

get 读取指定的 ReplicaSet 的状态

HTTP 请求

GET /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status

参数

响应

200 (ReplicaSet): OK

401: Unauthorized

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

HTTP 请求

GET /apis/apps/v1/namespaces/{namespace}/replicasets

参数

响应

200 (ReplicaSetList): OK

401: Unauthorized

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

HTTP 请求

GET /apis/apps/v1/replicasets

参数

响应

200 (ReplicaSetList): OK

401: Unauthorized

create 创建 ReplicaSet

HTTP 请求

POST /apis/apps/v1/namespaces/{namespace}/replicasets

参数

响应

200 (ReplicaSet): OK

201 (ReplicaSet): Created

202 (ReplicaSet): Accepted

401: Unauthorized

update 替换指定的 ReplicaSet

HTTP 请求

PUT /apis/apps/v1/namespaces/{namespace}/replicasets/{name}

参数

响应

200 (ReplicaSet): OK

201 (ReplicaSet): Created

401: Unauthorized

update 替换指定的 ReplicaSet 的状态

HTTP 请求

PUT /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status

参数

响应

200 (ReplicaSet): OK

201 (ReplicaSet): Created

401: Unauthorized

patch 部分更新指定的 ReplicaSet

HTTP 请求

PATCH /apis/apps/v1/namespaces/{namespace}/replicasets/{name}

参数

响应

200 (ReplicaSet): OK

201 (ReplicaSet): Created

401: Unauthorized

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

HTTP 请求

PATCH /apis/apps/v1/namespaces/{namespace}/replicasets/{name}/status

参数

响应

200 (ReplicaSet): OK

201 (ReplicaSet): Created

401: Unauthorized

delete 删除 ReplicaSet

HTTP 请求

DELETE /apis/apps/v1/namespaces/{namespace}/replicasets/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 ReplicaSet 的集合

HTTP 请求

DELETE /apis/apps/v1/namespaces/{namespace}/replicasets

参数

响应

200 (Status): OK

401: Unauthorized

5 - ReplicationController

ReplicationController 表示一个副本控制器的配置。

apiVersion: v1

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

ReplicationController

ReplicationController 表示一个副本控制器的配置。


ReplicationControllerSpec

ReplicationControllerSpec 表示一个副本控制器的规约。


ReplicationControllerStatus

ReplicationControllerStatus 表示一个副本控制器的当前状态。


ReplicationControllerList

ReplicationControllerList 是副本控制器的集合。


操作


get 读取指定的 ReplicationController

HTTP 请求

GET /api/v1/namespaces/{namespace}/replicationcontrollers/{name}

参数

响应

200 (ReplicationController): OK

401: Unauthorized

get 读取指定的 ReplicationController 的状态

HTTP 请求

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

参数

响应

200 (ReplicationController): OK

401: Unauthorized

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

HTTP 请求

GET /api/v1/namespaces/{namespace}/replicationcontrollers

参数

响应

200 (ReplicationControllerList): OK

401: Unauthorized

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

HTTP 请求

GET /api/v1/replicationcontrollers

参数

响应

200 (ReplicationControllerList): OK

401: Unauthorized

create 创建 ReplicationController

HTTP 请求

POST /api/v1/namespaces/{namespace}/replicationcontrollers

参数

响应

200 (ReplicationController): OK

201 (ReplicationController): Created

202 (ReplicationController): Accepted

401: Unauthorized

update 替换指定的 ReplicationController

HTTP 请求

PUT /api/v1/namespaces/{namespace}/replicationcontrollers/{name}

参数

响应

200 (ReplicationController): OK

201 (ReplicationController): Created

401: Unauthorized

update 替换指定的 ReplicationController 的状态

HTTP 请求

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

参数

响应

200 (ReplicationController): OK

201 (ReplicationController): Created

401: Unauthorized

patch 部分更新指定的 ReplicationController

HTTP 请求

PATCH /api/v1/namespaces/{namespace}/replicationcontrollers/{name}

参数

响应

200 (ReplicationController): OK

201 (ReplicationController): Created

401: Unauthorized

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

HTTP 请求

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

参数

响应

200 (ReplicationController): OK

201 (ReplicationController): Created

401: Unauthorized

delete 删除 ReplicationController

HTTP 请求

DELETE /api/v1/namespaces/{namespace}/replicationcontrollers/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 ReplicationController 的集合

HTTP 请求

DELETE /api/v1/namespaces/{namespace}/replicationcontrollers

参数

响应

200 (Status): OK

401: Unauthorized

6 - Deployment

Deployment 使得 Pod 和 ReplicaSet 能够进行声明式更新。

apiVersion: apps/v1

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

Deployment

Deployment 使得 Pod 和 ReplicaSet 能够进行声明式更新。


DeploymentSpec

DeploymentSpec 定义 Deployment 预期行为的规约。


DeploymentStatus

DeploymentStatus 是最近观测到的 Deployment 状态。


DeploymentList

DeploymentList 是 Deployment 的列表。


操作


get 读取指定的 Deployment

HTTP 请求

GET /apis/apps/v1/namespaces/{namespace}/deployments/{name}

参数

响应

200 (Deployment): OK

401: Unauthorized

get 读取指定的 Deployment 的状态

HTTP 请求

GET /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status

参数

响应

200 (Deployment): OK

401: Unauthorized

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

HTTP 请求

GET /apis/apps/v1/namespaces/{namespace}/deployments

参数

响应

200 (DeploymentList): OK

401: Unauthorized

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

HTTP 请求

GET /apis/apps/v1/deployments

参数

响应

200 (DeploymentList): OK

401: Unauthorized

create 创建 Deployment

HTTP 请求

POST /apis/apps/v1/namespaces/{namespace}/deployments

参数

响应

200 (Deployment): OK

201 (Deployment): Created

202 (Deployment): Accepted

401: Unauthorized

update 替换指定的 Deployment

HTTP 请求

PUT /apis/apps/v1/namespaces/{namespace}/deployments/{name}

参数

响应

200 (Deployment): OK

201 (Deployment): Created

401: Unauthorized

update 替换指定的 Deployment 的状态

HTTP 请求

PUT /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status

参数

响应

200 (Deployment): OK

201 (Deployment): Created

401: Unauthorized

patch 部分更新指定的 Deployment

HTTP 请求

PATCH /apis/apps/v1/namespaces/{namespace}/deployments/{name}

参数

响应

200 (Deployment): OK

201 (Deployment): Created

401: Unauthorized

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

HTTP 请求

PATCH /apis/apps/v1/namespaces/{namespace}/deployments/{name}/status

参数

响应

200 (Deployment): OK

201 (Deployment): Created

401: Unauthorized

delete 删除 Deployment

HTTP 请求

DELETE /apis/apps/v1/namespaces/{namespace}/deployments/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 Deployment 的集合

HTTP 请求

DELETE /apis/apps/v1/namespaces/{namespace}/deployments

参数

响应

200 (Status): OK

401: Unauthorized

7 - StatefulSet

StatefulSet 表示一组具有一致身份的 Pod

apiVersion: apps/v1

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

StatefulSet

StatefulSet 表示一组具有一致身份的 Pod。身份定义为:

StatefulSet 保证给定的网络身份将始终映射到相同的存储身份。


StatefulSetSpec

StatefulSetSpec 是 StatefulSet 的规约。


StatefulSetStatus

StatefulSetStatus 表示 StatefulSet 的当前状态。


StatefulSetList

StatefulSetList 是 StatefulSet 的集合。


操作


get 读取指定的 StatefulSet

HTTP 请求

GET /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}

参数

响应

200 (StatefulSet): OK

401: Unauthorized

get 读取指定 StatefulSet 的状态

HTTP 请求

GET /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status

参数

响应

200 (StatefulSet): OK

401: Unauthorized

list 列出或监视 StatefulSet 类型的对象

HTTP 请求

GET /apis/apps/v1/namespaces/{namespace}/statefulsets

参数

响应

200 (StatefulSetList): OK

401: Unauthorized

list 列出或监视 StatefulSet 类型的对象

HTTP 请求

GET /apis/apps/v1/statefulsets

参数

响应

200 (StatefulSetList): OK

401: Unauthorized

create 创建一个 StatefulSet

HTTP 请求

POST /apis/apps/v1/namespaces/{namespace}/statefulsets

参数

pretty

响应

200 (StatefulSet): OK

201 (StatefulSet): Created

202 (StatefulSet): Accepted

401: Unauthorized

update 替换指定的 StatefulSet

HTTP 请求

PUT /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}

参数

响应

200 (StatefulSet): OK

201 (StatefulSet): Created

401: Unauthorized

update 替换指定 StatefulSet 的状态

HTTP 请求

PUT /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status

参数

响应

200 (StatefulSet): OK

201 (StatefulSet): Created

401: Unauthorized

patch 部分更新指定的 StatefulSet

HTTP 请求

PATCH /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}

参数

响应

200 (StatefulSet): OK

201 (StatefulSet): Created

401: Unauthorized

patch 部分更新指定 StatefulSet 的状态

HTTP 请求

PATCH /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}/status

参数

响应

200 (StatefulSet): OK

201 (StatefulSet): Created

401: Unauthorized

delete 删除一个 StatefulSet

HTTP 请求

DELETE /apis/apps/v1/namespaces/{namespace}/statefulsets/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 StatefulSet 的集合

HTTP 请求

DELETE /apis/apps/v1/namespaces/{namespace}/statefulsets

参数

响应

200 (Status): OK

401: Unauthorized

8 - ControllerRevision

ControllerRevision 实现了状态数据的不可变快照。

apiVersion: apps/v1

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

ControllerRevision

ControllerRevision 实现了状态数据的不可变快照。 客户端负责序列化和反序列化对象,包含对象内部状态。 成功创建 ControllerRevision 后,将无法对其进行更新。 API 服务器将无法成功验证所有尝试改变 data 字段的请求。 但是,可以删除 ControllerRevisions。 请注意,由于 DaemonSet 和 StatefulSet 控制器都使用它来进行更新和回滚,所以这个对象是 Beta 版。 但是,它可能会在未来版本中更改名称和表示形式,客户不应依赖其稳定性。 它主要供控制器内部使用。


ControllerRevisionList

ControllerRevisionList 是一个包含 ControllerRevision 对象列表的资源。


操作


get 读取特定的 ControllerRevision

HTTP 请求

GET /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}

参数

响应

200 (ControllerRevision): OK

401: Unauthorized

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

HTTP 请求

GET /apis/apps/v1/namespaces/{namespace}/controllerrevisions

参数

响应

200 (ControllerRevisionList): OK

401: Unauthorized

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

HTTP 请求

GET /apis/apps/v1/controllerrevisions

参数

响应

200 (ControllerRevisionList): OK

401: Unauthorized

create 创建一个 ControllerRevision

HTTP 请求

POST /apis/apps/v1/namespaces/{namespace}/controllerrevisions

参数

响应

200 (ControllerRevision): OK

201 (ControllerRevision): Created

202 (ControllerRevision): Accepted

401: Unauthorized

update 替换特定的 ControllerRevision

HTTP 参数

PUT /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}

参数

响应

200 (ControllerRevision): OK

201 (ControllerRevision): Created

401: Unauthorized

patch 部分更新特定的 ControllerRevision

HTTP 请求

PATCH /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}

参数

响应

200 (ControllerRevision): OK

201 (ControllerRevision): Created

401: Unauthorized

delete 删除一个 ControllerRevision

HTTP 请求

DELETE /apis/apps/v1/namespaces/{namespace}/controllerrevisions/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 ControllerRevision 集合

HTTP 请求

DELETE /apis/apps/v1/namespaces/{namespace}/controllerrevisions

参数

响应

200 (Status): OK

401: Unauthorized

9 - DaemonSet

DaemonSet 表示守护进程集的配置。

apiVersion: apps/v1

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

DaemonSet

DaemonSet 表示守护进程集的配置。


DaemonSetSpec

DaemonSetSpec 是守护进程集的规约。


DaemonSetStatus

DaemonSetStatus 表示守护进程集的当前状态。


DaemonSetList

DaemonSetList 是守护进程集的集合。


Operations


get 读取指定的 DaemonSet

HTTP 请求

GET /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}

参数

响应

200 (DaemonSet): OK

401: 未授权

get 读取指定的 DaemonSet 的状态

HTTP 请求

GET /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status

参数

响应

200 (DaemonSet): OK

401: 未授权

list 列表或查看 DaemonSet 类型的对象

HTTP 请求

GET /apis/apps/v1/namespaces/{namespace}/daemonsets

参数

响应

200 (DaemonSetList): OK

401: 未授权

list 列表或查看 DaemonSet 类型的对象

HTTP 请求

GET /apis/apps/v1/daemonsets

参数

响应

200 (DaemonSetList): OK

401: 未授权

create 创建一个 DaemonSet

HTTP 请求

POST /apis/apps/v1/namespaces/{namespace}/daemonsets

参数

响应

200 (DaemonSet): OK

201 (DaemonSet): 已创建

202 (DaemonSet): 已接受

401: 未授权

update 替换指定的 DaemonSet

HTTP 请求

PUT /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}

参数

响应

200 (DaemonSet): OK

201 (DaemonSet): 已创建

401: 未授权

update 替换指定 DaemonSet 的状态

HTTP 请求

PUT /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status

参数

响应

200 (DaemonSet): OK

201 (DaemonSet): 已创建

401: 未授权

patch 部分更新指定的 DaemonSet

HTTP 请求

PATCH /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}

参数

响应

200 (DaemonSet): OK

201 (DaemonSet): 已创建

401: 未授权

patch 部分更新指定 DaemonSet 的状态

HTTP 请求

PATCH /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}/status

参数

响应

200 (DaemonSet): OK

201 (DaemonSet): 已创建

401: 未授权

delete 删除一个 DaemonSet

HTTP 请求

DELETE /apis/apps/v1/namespaces/{namespace}/daemonsets/{name}

参数

响应

200 (Status): OK

202 (Status): 已接受

401: 未授权

deletecollection 删除 DaemonSet 的集合

HTTP 请求

DELETE /apis/apps/v1/namespaces/{namespace}/daemonsets

参数

响应

200 (Status): OK

401: 未授权

10 - Job

Job 表示单个任务的配置。

apiVersion: batch/v1

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

Job

Job 表示单个任务的配置。


JobSpec

JobSpec 描述了任务执行的情况。


Replicas

Lifecycle

Selector

Beta 级别

Alpha 级别

JobStatus

JobStatus 表示 Job 的当前状态。


Beta 级别

Alpha 级别

JobList

JobList 是 Job 的集合。


操作


get 读取指定的 Job

HTTP 请求

GET /apis/batch/v1/namespaces/{namespace}/jobs/{name}

参数

响应

200 (Job): OK

401: Unauthorized

get 读取指定任务的状态

HTTP 请求

GET /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status

参数

响应

200 (Job): OK

401: Unauthorized

list 列举或监测 Job 类别的对象

HTTP 请求

GET /apis/batch/v1/namespaces/{namespace}/jobs

参数

响应

200 (JobList): OK

401: Unauthorized

list 列举或监测 Job 类别的对象

HTTP 请求

GET /apis/batch/v1/jobs

参数

响应

200 (JobList): OK

401: Unauthorized

create 创建一个 Job

HTTP 请求

POST /apis/batch/v1/namespaces/{namespace}/jobs

参数

响应

200 (Job): OK

201 (Job): Created

202 (Job): Accepted

401: Unauthorized

update 替换指定的 Job

HTTP 请求

PUT /apis/batch/v1/namespaces/{namespace}/jobs/{name}

参数

响应

200 (Job): OK

201 (Job): Created

401: Unauthorized

update 替换指定 Job 的状态

HTTP 请求

PUT /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status

参数

响应

200 (Job): OK

201 (Job): Created

401: Unauthorized

patch 部分更新指定的 Job

HTTP 请求

PATCH /apis/batch/v1/namespaces/{namespace}/jobs/{name}

参数

响应

200 (Job): OK

201 (Job): Created

401: Unauthorized

patch 部分更新指定 Job 的状态

HTTP 请求

PATCH /apis/batch/v1/namespaces/{namespace}/jobs/{name}/status

参数

响应

200 (Job): OK

201 (Job): Created

401: Unauthorized

delete 删除一个 Job

HTTP 请求

DELETE /apis/batch/v1/namespaces/{namespace}/jobs/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 Job 的集合

HTTP 请求

DELETE /apis/batch/v1/namespaces/{namespace}/jobs

参数

响应

200 (Status): OK

401: Unauthorized

11 - CronJob

CronJob 代表单个定时作业(Cron Job)的配置。

apiVersion: batch/v1

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

CronJob

CronJob 代表单个定时作业(Cron Job)的配置。


CronJobSpec

CronJobSpec 描述了作业的执行方式和实际将运行的时间。


CronJobStatus

CronJobStatus 表示某个定时作业的当前状态。


CronJobList

CronJobList 是定时作业的集合。


操作


get 查看指定的 CronJob

HTTP 请求

GET /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}

参数

响应

200 (CronJob): OK

401: Unauthorized

get 查看指定 CronJob 的状态

HTTP 请求

GET /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status

参数

响应

200 (CronJob): OK

401: Unauthorized

list 查看或监视 CronJob 类别的对象

HTTP 请求

GET /apis/batch/v1/namespaces/{namespace}/cronjobs

参数

响应

200 (CronJobList): OK

401: Unauthorized

list 查看或监视 CronJob 类型的对象

HTTP 请求

GET /apis/batch/v1/cronjobs

参数

响应

200 (CronJobList): OK

401: Unauthorized

create 创建一个 CronJob

HTTP 请求

POST /apis/batch/v1/namespaces/{namespace}/cronjobs

参数

响应

200 (CronJob): OK

201 (CronJob): Created

202 (CronJob): Accepted

401: Unauthorized

update 替换指定的 CronJob

HTTP 请求

PUT /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}

参数

响应

200 (CronJob): OK

201 (CronJob): Created

401: Unauthorized

update 替换指定 CronJob 的状态

HTTP 请求

PUT /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status

参数

响应

200 (CronJob): OK

201 (CronJob): Created

401: Unauthorized

patch 部分更新指定的 CronJob

HTTP 请求

PATCH /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}

参数

响应

200 (CronJob): OK

201 (CronJob): Created

401: Unauthorized

patch 部分更新指定 CronJob 的状态

HTTP 请求

PATCH /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}/status

参数

响应

200 (CronJob): OK

201 (CronJob): Created

401: Unauthorized

delete 删除一个 CronJob

HTTP 请求

DELETE /apis/batch/v1/namespaces/{namespace}/cronjobs/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除一组 CronJob

HTTP 请求

DELETE /apis/batch/v1/namespaces/{namespace}/cronjobs

参数

响应

200 (Status): OK

401: Unauthorized

12 - HorizontalPodAutoscaler

水平 Pod 自动缩放器的配置。

apiVersion: autoscaling/v1

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

HorizontalPodAutoscaler

水平 Pod 自动缩放器的配置。


HorizontalPodAutoscalerSpec

水平 Pod 自动缩放器的规约。


HorizontalPodAutoscalerStatus

水平 Pod 自动缩放器的当前状态


HorizontalPodAutoscalerList

水平 Pod 自动缩放器对象列表。


操作


get 读取特定的 HorizontalPodAutoscaler

HTTP 请求

GET /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}

参数

响应

200 (HorizontalPodAutoscaler): OK

401: Unauthorized

get 读取特定 HorizontalPodAutoscaler 的状态

HTTP 请求

GET /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status

参数

响应

200 (HorizontalPodAutoscaler): OK

401: Unauthorized

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

HTTP 参数

GET /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers

参数

响应

200 (HorizontalPodAutoscalerList): OK

401: Unauthorized

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

HTTP 请求

GET /apis/autoscaling/v1/horizontalpodautoscalers

参数

响应

200 (HorizontalPodAutoscalerList): OK

401: Unauthorized

create 创建一个 HorizontalPodAutoscaler

HTTP 请求

POST /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers

参数

响应

200 (HorizontalPodAutoscaler): OK

201 (HorizontalPodAutoscaler): Created

202 (HorizontalPodAutoscaler): Accepted

401: Unauthorized

update 替换特定的 HorizontalPodAutoscaler

HTTP 请求

PUT /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}

参数

响应

200 (HorizontalPodAutoscaler): OK

201 (HorizontalPodAutoscaler): Created

401: Unauthorized

update 替换特定 HorizontalPodAutoscaler 的状态

HTTP 请求

PUT /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status

参数

响应

200 (HorizontalPodAutoscaler): OK

201 (HorizontalPodAutoscaler): Created

401: Unauthorized

patch 部分更新特定的 HorizontalPodAutoscaler

HTTP 请求

PATCH /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}

参数

响应

200 (HorizontalPodAutoscaler): OK

201 (HorizontalPodAutoscaler): Created

401: Unauthorized

patch 部分更新特定 HorizontalPodAutoscaler 的状态

HTTP 请求

PATCH /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}/status

参数

响应

200 (HorizontalPodAutoscaler): OK

201 (HorizontalPodAutoscaler): Created

401: Unauthorized

delete 删除一个 HorizontalPodAutoscaler

HTTP 请求

DELETE /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 HorizontalPodAutoscaler 的集合

HTTP 请求

DELETE /apis/autoscaling/v1/namespaces/{namespace}/horizontalpodautoscalers

参数

响应

200 (Status): OK

401: Unauthorized

13 - HorizontalPodAutoscaler

HorizontalPodAutoscaler 是水平 Pod 自动扩缩器的配置,它根据指定的指标自动管理实现 scale 子资源的任何资源的副本数。

apiVersion: autoscaling/v2

import "k8s.io/api/autoscaling/v2"

HorizontalPodAutoscaler

HorizontalPodAutoscaler 是水平 Pod 自动扩缩器的配置, 它根据指定的指标自动管理实现 scale 子资源的任何资源的副本数。


HorizontalPodAutoscalerSpec

HorizontalPodAutoscalerSpec 描述了 HorizontalPodAutoscaler 预期的功能。


HorizontalPodAutoscalerStatus

HorizontalPodAutoscalerStatus 描述了水平 Pod 自动扩缩器的当前状态。


HorizontalPodAutoscalerList

HorizontalPodAutoscalerList 是水平 Pod 自动扩缩器对象列表。


Operations


get 读取指定的 HorizontalPodAutoscaler

HTTP 请求

GET /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}

参数

响应

200 (HorizontalPodAutoscaler): OK

401: Unauthorized

get 读取指定 HorizontalPodAutoscaler 的状态

HTTP 请求

GET /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status

参数

响应

200 (HorizontalPodAutoscaler): OK

401: Unauthorized

list 列出或观察 HorizontalPodAutoscaler 类别的对象

HTTP 请求

GET /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers

参数

响应

200 (HorizontalPodAutoscalerList): OK

401: Unauthorized

list 列出或观察 HorizontalPodAutoscaler 类别的对象

HTTP 请求

GET /apis/autoscaling/v2/horizontalpodautoscalers

参数

响应

200 (HorizontalPodAutoscalerList): OK

401: Unauthorized

create 创建一个 HorizontalPodAutoscaler

HTTP 请求

POST /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers

参数

响应

200 (HorizontalPodAutoscaler): OK

201 (HorizontalPodAutoscaler): Created

202 (HorizontalPodAutoscaler): Accepted

401: Unauthorized

update 替换指定的 HorizontalPodAutoscaler

HTTP 请求

PUT /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}

参数

响应

200 (HorizontalPodAutoscaler): OK

201 (HorizontalPodAutoscaler): Created

401: Unauthorized

update 替换指定 HorizontalPodAutoscaler 的状态

HTTP 请求

PUT /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status

参数

响应

200 (HorizontalPodAutoscaler): OK

201 (HorizontalPodAutoscaler): Created

401: Unauthorized

patch 部分更新指定的 HorizontalPodAutoscaler

HTTP 请求

PATCH /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}

参数

响应

200 (HorizontalPodAutoscaler): OK

201 (HorizontalPodAutoscaler): Created

401: Unauthorized

patch 部分更新指定 HorizontalPodAutoscaler 的状态

HTTP 请求

PATCH /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}/status

参数

响应

200 (HorizontalPodAutoscaler): OK

201 (HorizontalPodAutoscaler): Created

401: Unauthorized

delete 删除一个 HorizontalPodAutoscaler

HTTP 请求

DELETE /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 HorizontalPodAutoscaler 的集合

HTTP 请求

DELETE /apis/autoscaling/v2/namespaces/{namespace}/horizontalpodautoscalers

参数

响应

200 (Status): OK

401: Unauthorized

14 - PriorityClass

PriorityClass 定义了从优先级类名到优先级数值的映射。

apiVersion: scheduling.k8s.io/v1

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

PriorityClass

PriorityClass 定义了从优先级类名到优先级数值的映射。 该值可以是任何有效的整数。


PriorityClassList

PriorityClassList 是优先级类的集合。


操作


get 读取特定的 PriorityClass

HTTP 请求

GET /apis/scheduling.k8s.io/v1/priorityclasses/{name}

参数

响应

200 (PriorityClass): OK

401: Unauthorized

list 列出或观察 PriorityClass类的对象

HTTP 请求

GET /apis/scheduling.k8s.io/v1/priorityclasses

参数

响应

200 (PriorityClassList): OK

401: Unauthorized

create 创建一个 PriorityClass

HTTP 请求

POST /apis/scheduling.k8s.io/v1/priorityclasses

参数

响应

200 (PriorityClass): OK

201 (PriorityClass): Created

202 (PriorityClass): Accepted

401: Unauthorized

update 替换指定的 PriorityClass

HTTP 请求

PUT /apis/scheduling.k8s.io/v1/priorityclasses/{name}

参数

响应

200 (PriorityClass): OK

201 (PriorityClass): Created

401: Unauthorized

patch 部分更新特定的 PriorityClass

HTTP 请求

PATCH /apis/scheduling.k8s.io/v1/priorityclasses/{name}

参数

响应

200 (PriorityClass): OK

201 (PriorityClass): Created

401: Unauthorized

delete 删除一个 PriorityClass

HTTP 请求

DELETE /apis/scheduling.k8s.io/v1/priorityclasses/{name}

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 PriorityClass 集合

HTTP 请求

DELETE /apis/scheduling.k8s.io/v1/priorityclasses

参数

响应

200 (Status): OK

401: Unauthorized

15 - DeviceTaintRule v1alpha3

DeviceTaintRule 添加一个污点到与选择算符匹配的所有设备上。

apiVersion: resource.k8s.io/v1alpha3

import "k8s.io/api/resource/v1alpha3"

DeviceTaintRule

DeviceTaintRule 添加一个污点到与选择算符匹配的所有设备上。 这与通过 DRA 驱动直接在 ResourceSlice 中指定污点具有同样的效果。


DeviceTaintRuleSpec

DeviceTaintRuleSpec 指定选择算符和一个污点。


DeviceTaintRuleList

DeviceTaintRuleList 是 DeviceTaintRules 的集合。


操作


get 读取指定的 DeviceTaintRule

HTTP 请求

GET /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}

参数

响应

200 (DeviceTaintRule): OK

401: Unauthorized

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

HTTP 请求

GET /apis/resource.k8s.io/v1alpha3/devicetaintrules

参数

响应

200 (DeviceTaintRuleList): OK

401: Unauthorized

create 创建 DeviceTaintRule

HTTP 请求

POST /apis/resource.k8s.io/v1alpha3/devicetaintrules

参数

响应

200 (DeviceTaintRule): OK

201 (DeviceTaintRule): Created

202 (DeviceTaintRule): Accepted

401: Unauthorized

update 替换指定的 DeviceTaintRule

HTTP 请求

PUT /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}

参数

响应

200 (DeviceTaintRule): OK

201 (DeviceTaintRule): Created

401: Unauthorized

patch 部分更新指定的 DeviceTaintRule

HTTP 请求

PATCH /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}

参数

响应

200 (DeviceTaintRule): OK

201 (DeviceTaintRule): Created

401: Unauthorized

delete 删除 DeviceTaintRule

HTTP 请求

DELETE /apis/resource.k8s.io/v1alpha3/devicetaintrules/{name}

参数

响应

200 (DeviceTaintRule): OK

202 (DeviceTaintRule): Accepted

401: Unauthorized

deletecollection 删除 DeviceTaintRule 的集合

HTTP 请求

DELETE /apis/resource.k8s.io/v1alpha3/devicetaintrules

参数

响应

200 (Status): OK

401: Unauthorized

16 - ResourceClaim v1beta2

ResourceClaim 描述对集群中供工作负载使用的资源的访问请求。

apiVersion: resource.k8s.io/v1beta2

import "k8s.io/api/resource/v1beta2"

ResourceClaim

ResourceClaim 描述对集群中供工作负载使用的资源的访问请求。 例如,如果某个工作负载需要具有特定属性的加速器设备,这就是表达该请求的方式。 状态部分跟踪此申领是否已被满足,以及具体分配了哪些资源。

这是一个 Alpha 级别的资源类型,需要启用 DynamicResourceAllocation 特性门控。


ResourceClaimSpec

ResourceClaimSpec 定义在 ResourceClaim 中正在被请求的资源及其配置方式。


ResourceClaimStatus

ResourceClaimStatus 跟踪资源是否已被分配以及产生的结果是什么。


ResourceClaimList

ResourceClaimList 是申领的集合。


操作


get 读取指定的 ResourceClaim

HTTP 请求

GET /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}

参数

响应

200 (ResourceClaim): OK

401: Unauthorized

get 读取指定 ResourceClaim 的状态

HTTP 请求

GET /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}/status

参数

响应

200 (ResourceClaim): OK

401: Unauthorized

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

HTTP 请求

GET /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims

参数

响应

200 (ResourceClaimList): OK

401: Unauthorized

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

HTTP 请求

GET /apis/resource.k8s.io/v1beta2/resourceclaims

参数

响应

200 (ResourceClaimList): OK

401: Unauthorized

create 创建 ResourceClaim

HTTP 请求

POST /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims

参数

响应

200 (ResourceClaim): OK

201 (ResourceClaim): Created

202 (ResourceClaim): Accepted

401: Unauthorized

update 替换指定的 ResourceClaim

HTTP 请求

PUT /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}

参数

响应

200 (ResourceClaim): OK

201 (ResourceClaim): Created

401: Unauthorized

update 替换指定 ResourceClaim 的状态

HTTP 请求

PUT /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}/status

参数

响应

200 (ResourceClaim): OK

201 (ResourceClaim): Created

401: Unauthorized

patch 部分更新指定的 ResourceClaim

HTTP 请求

PATCH /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}

参数

响应

200 (ResourceClaim): OK

201 (ResourceClaim): Created

401: Unauthorized

patch 部分更新指定 ResourceClaim 的状态

HTTP 请求

PATCH /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}/status

参数

响应

200 (ResourceClaim): OK

201 (ResourceClaim): Created

401: Unauthorized

delete 删除 ResourceClaim

HTTP 请求

DELETE /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims/{name}

参数

响应

200 (ResourceClaim): OK

202 (ResourceClaim): Accepted

401: Unauthorized

deletecollection 删除 ResourceClaim 的集合

HTTP 请求

DELETE /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaims

参数

响应

200 (Status): OK

401: Unauthorized

17 - ResourceClaimTemplate v1beta2

ResourceClaimTemplate 用于生成 ResourceClaim 对象。

apiVersion: resource.k8s.io/v1beta2

import "k8s.io/api/resource/v1beta2"

ResourceClaimTemplate

ResourceClaimTemplate 用于生成 ResourceClaim 对象。

这是一个 Alpha 类型的特性,需要启用 DynamicResourceAllocation 特性门控。


ResourceClaimTemplateSpec

ResourceClaimTemplateSpec 包含针对 ResourceClaim 的元数据和字段。


ResourceClaimTemplateList

ResourceClaimTemplateList 是申领模板的集合。


操作


get 读取指定的 ResourceClaimTemplate

HTTP 请求

GET /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}

参数

响应

200 (ResourceClaimTemplate): OK

401: Unauthorized

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

HTTP 请求

GET /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates

参数

响应

200 (ResourceClaimTemplateList): OK

401: Unauthorized

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

HTTP 请求

GET /apis/resource.k8s.io/v1beta2/resourceclaimtemplates

参数

响应

200 (ResourceClaimTemplateList): OK

401: Unauthorized

create 创建 ResourceClaimTemplate

HTTP 请求

POST /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates

参数

响应

200 (ResourceClaimTemplate): OK

201 (ResourceClaimTemplate): Created

202 (ResourceClaimTemplate): Accepted

401: Unauthorized

update 替换指定的 ResourceClaimTemplate

HTTP 请求

PUT /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}

参数

响应

200 (ResourceClaimTemplate): OK

201 (ResourceClaimTemplate): Created

401: Unauthorized

patch 部分更新指定的 ResourceClaimTemplate

HTTP 请求

PATCH /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}

参数

响应

200 (ResourceClaimTemplate): OK

201 (ResourceClaimTemplate): Created

401: Unauthorized

delete 删除 ResourceClaimTemplate

HTTP 请求

DELETE /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}

参数

响应

200 (ResourceClaimTemplate): OK

202 (ResourceClaimTemplate): Accepted

401: Unauthorized

deletecollection 删除 ResourceClaimTemplate 的集合

HTTP 请求

DELETE /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates

参数

响应

200 (Status): OK

401: Unauthorized

18 - ResourceSlice v1beta1

ResourceSlice 表示一个或多个资源,这些资源位于同一个驱动所管理的、彼此相似的资源构成的资源池。

apiVersion: resource.k8s.io/v1beta1

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

ResourceSlice

ResourceSlice 表示一个或多个资源,这些资源位于同一个驱动所管理的、彼此相似的资源构成的资源池。 一个池可以包含多个 ResourceSlice,一个池包含多少个 ResourceSlice 由驱动确定。

目前,所支持的资源只能是具有属性和容量的设备。 给定池中的每个设备,无论有多少个 ResourceSlice,必须具有唯一名称。 发布设备的 ResourceSlice 可能会随着时间的推移而变化。 设备的唯一标识符是元组 <驱动名称>、<池名称>、<设备名称>。

每当驱动需要更新池时,pool.spec.pool.generation 编号加一, 并用新的编号和新的资源定义来更新所有 ResourceSlice。 资源用户必须仅使用 generation 编号最大的 ResourceSlice,并忽略所有其他 ResourceSlice。

从池中分配符合某些条件的所有资源或在多个不同分配方案间寻找最佳方案时, 资源用户应检查池中的 ResourceSlice 数量(包含在每个 ResourceSlice 中), 以确定其对池的视图是否完整,如果不完整,则应等到驱动完成对池的更新。

对于非某节点本地的资源,节点名称不会被设置。 驱动可以使用节点选择算符来给出设备的可用位置。

此特性为 Alpha 级别,需要启用 DynamicResourceAllocation 特性门控。


ResourceSliceSpec

ResourceSliceSpec 包含驱动在一个 ResourceSlice 中所发布的信息。


ResourceSliceList

ResourceSliceList 是 ResourceSlice 的集合。


操作


get 读取指定的 ResourceSlice

HTTP 请求

GET /apis/resource.k8s.io/v1beta1/resourceslices/{name}

参数

响应

200 (ResourceSlice): OK

401: Unauthorized

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

HTTP 请求

GET /apis/resource.k8s.io/v1beta1/resourceslices

参数

响应

200 (ResourceSliceList): OK

401: Unauthorized

create 创建 ResourceSlice

HTTP 请求

POST /apis/resource.k8s.io/v1beta1/resourceslices

参数

响应

200 (ResourceSlice): OK

201 (ResourceSlice): Created

202 (ResourceSlice): Accepted

401: Unauthorized

update 替换指定的 ResourceSlice

HTTP 请求

PUT /apis/resource.k8s.io/v1beta1/resourceslices/{name}

参数

响应

200 (ResourceSlice): OK

201 (ResourceSlice): Created

401: Unauthorized

patch 部分更新指定的 ResourceSlice

HTTP 请求

PATCH /apis/resource.k8s.io/v1beta1/resourceslices/{name}

参数

响应

200 (ResourceSlice): OK

201 (ResourceSlice): Created

401: Unauthorized

delete 删除 ResourceSlice

HTTP 请求

DELETE /apis/resource.k8s.io/v1beta1/resourceslices/{name}

参数

响应

200 (ResourceSlice): OK

202 (ResourceSlice): Accepted

401: Unauthorized

deletecollection 删除 ResourceSlice 的集合

HTTP 请求

DELETE /apis/resource.k8s.io/v1beta1/resourceslices

参数

响应

200 (Status): OK

401: Unauthorized

19 - ResourceSlice v1alpha3

ResourceSlice 表示一个或多个资源,这些资源位于同一个驱动所管理的、彼此相似的资源构成的资源池。

apiVersion: resource.k8s.io/v1alpha3

import "k8s.io/api/resource/v1alpha3"

ResourceSlice

ResourceSlice 表示一个或多个资源,这些资源位于同一个驱动所管理的、彼此相似的资源构成的资源池。 一个池可以包含多个 ResourceSlice,一个池包含多少个 ResourceSlice 由驱动确定。

目前,所支持的资源只能是具有属性和容量的设备。 给定池中的每个设备,无论有多少个 ResourceSlice,必须具有唯一名称。 发布设备的 ResourceSlice 可能会随着时间的推移而变化。 设备的唯一标识符是元组 <驱动名称>、<池名称>、<设备名称>。

每当驱动需要更新池时,pool.spec.pool.generation 编号加一, 并用新的编号和新的资源定义来更新所有 ResourceSlice。 资源用户必须仅使用 generation 编号最大的 ResourceSlice,并忽略所有其他 ResourceSlice。

从池中分配符合某些条件的所有资源或在多个不同分配方案间寻找最佳方案时, 资源用户应检查池中的 ResourceSlice 数量(包含在每个 ResourceSlice 中), 以确定其对池的视图是否完整,如果不完整,则应等到驱动完成对池的更新。

对于非某节点本地的资源,节点名称不会被设置。 驱动可以使用节点选择算符来给出设备的可用位置。

此特性为 Alpha 级别,需要启用 DynamicResourceAllocation 特性门控。


ResourceSliceSpec

ResourceSliceSpec 包含驱动在一个 ResourceSlice 中所发布的信息。


ResourceSliceList

ResourceSliceList 是 ResourceSlice 的集合。


操作


get 读取指定的 ResourceSlice

HTTP 请求

GET /apis/resource.k8s.io/v1alpha3/resourceslices/{name}

参数

响应

200 (ResourceSlice): OK

401: Unauthorized

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

HTTP 请求

GET /apis/resource.k8s.io/v1alpha3/resourceslices

参数

响应

200 (ResourceSliceList): OK

401: Unauthorized

create 创建 ResourceSlice

HTTP 请求

POST /apis/resource.k8s.io/v1alpha3/resourceslices

参数

响应

200 (ResourceSlice): OK

201 (ResourceSlice): Created

202 (ResourceSlice): Accepted

401: Unauthorized

update 替换指定的 ResourceSlice

HTTP 请求

PUT /apis/resource.k8s.io/v1alpha3/resourceslices/{name}

参数

响应

200 (ResourceSlice): OK

201 (ResourceSlice): Created

401: Unauthorized

patch 部分更新指定的 ResourceSlice

HTTP 请求

PATCH /apis/resource.k8s.io/v1alpha3/resourceslices/{name}

参数

响应

200 (ResourceSlice): OK

201 (ResourceSlice): Created

401: Unauthorized

delete 删除 ResourceSlice

HTTP 请求

DELETE /apis/resource.k8s.io/v1alpha3/resourceslices/{name}

参数

响应

200 (ResourceSlice): OK

202 (ResourceSlice): Accepted

401: Unauthorized

deletecollection 删除 ResourceSlice 的集合

HTTP 请求

DELETE /apis/resource.k8s.io/v1alpha3/resourceslices

参数

响应

200 (Status): OK

401: Unauthorized