1 - Namespace
apiVersion: v1
import "k8s.io/api/core/v1"
Namespace
Namespace 为名字提供作用域。使用多个命名空间是可选的。
-
apiVersion: v1
-
kind: Namespace
-
metadata (ObjectMeta)
标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-
spec (NamespaceSpec)
spec 定义了 Namespace 的行为。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
-
status (NamespaceStatus)
status 描述了当前 Namespace 的状态。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
NamespaceSpec
NamespaceSpec 用于描述 Namespace 的属性。
- finalizers ([]string) finalizers 是一个不透明的值列表,只有此列表为空时才能从存储中永久删除对象。 更多信息: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
NamespaceStatus
NamespaceStatus 表示 Namespace 的当前状态信息。
-
conditions ([]NamespaceCondition)
补丁策略:基于
type
健合并表示命名空间当前状态的最新可用状况。
NamespaceCondition 包含命名空间状态的详细信息。
-
conditions.status (string),必需
状况(condition)的状态,取值为 True、False 或 Unknown 之一。
- conditions.type (string), 必需
命名空间控制器状况的类型。
-
-
phase (string)
phase 是命名空间的当前生命周期阶段。更多信息: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/
NamespaceList
NamespaceList 是一个命名空间列表。
-
apiVersion: v1
-
kind: NamespaceList
-
metadata (ListMeta)
标准的列表元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
-
items ([]Namespace),必需
items 是列表中的 Namespace 对象列表。更多信息: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/
操作
get
读取指定的 Namespace
HTTP 请求
GET /api/v1/namespaces/{name}
参数
-
name (路径参数):string,必需
Namespace 的名称
-
pretty (查询参数):string
响应
200 (Namespace):OK
401:Unauthorized
get
读取指定 Namespace 的状态
HTTP 请求
GET /api/v1/namespaces/{name}/status
参数
-
name (路径参数):string,必需
Namespace 的名称
-
pretty (查询参数):string
响应
200 (Namespace):OK
401:Unauthorized
list
列出或者检查类别为 Namespace 的对象
HTTP 请求
GET /api/v1/namespaces
参数
-
allowWatchBookmarks (查询参数):boolean
-
continue (查询参数):string
-
fieldSelector (查询参数):string
-
labelSelector (查询参数):string
-
limit (查询参数):integer
-
pretty (查询参数):string
-
resourceVersion (查询参数):string
-
resourceVersionMatch (查询参数):string
-
timeoutSeconds (查询参数):integer
-
watch (查询参数):boolean
响应
200 (NamespaceList):OK
401:Unauthorized
create
创建一个 Namespace
HTTP 请求
POST /api/v1/namespaces
参数
- body: Namespace,必需
-
dryRun (查询参数):string
-
fieldManager (查询参数):string
-
fieldValidation (查询参数):string
-
pretty (查询参数):string
响应
200 (Namespace):OK
201 (Namespace):Created
202 (Namespace):Accepted
401:Unauthorized
update
替换指定的 Namespace
HTTP 请求
PUT /api/v1/namespaces/{name}
参数
-
name (路径参数):string,必需
Namespace 的名称
-
body: Namespace, 必需
-
dryRun (查询参数):string
-
fieldManager (查询参数):string
-
fieldValidation (查询参数):string
-
pretty (查询参数):string
响应
200 (Namespace):OK
201 (Namespace):Created
401:Unauthorized
update
替换指定 Namespace 的终结器
HTTP 请求
PUT /api/v1/namespaces/{name}/finalize
参数
-
name (路径参数):string,必需
Namespace 的名称
-
body: Namespace,必需
-
dryRun (查询参数):string
-
fieldManager (查询参数):string
-
fieldValidation (查询参数):string
-
pretty (查询参数):string
响应
200 (Namespace):OK
201 (Namespace):Created
401:Unauthorized
update
替换指定 Namespace 的状态
HTTP 请求
PUT /api/v1/namespaces/{name}/status
参数
-
name (路径阐述):string,必需
Namespace 的名称
-
body: Namespace,必需
-
dryRun (查询参数):string
-
fieldManager (查询参数):string
-
fieldValidation (查询参数):string
-
pretty (查询参数):string
响应
200 (Namespace):OK
201 (Namespace):Created
401: Unauthorized
patch
部分更新指定的 Namespace
HTTP 请求
PATCH /api/v1/namespaces/{name}
参数
-
name (路径参数):string,必需
Namespace 的名称
- body: Patch,必需
-
dryRun (查询参数):string
-
fieldManager (查询参数):string
-
fieldValidation (查询参数):string
-
force (查询参数):boolean
-
pretty (查询参数): string
响应
200 (Namespace):OK
201 (Namespace):Created
401: Unauthorized
patch
部分更新指定 Namespace 的状态
HTTP 请求
PATCH /api/v1/namespaces/{name}/status
参数
-
name (路径参数):string,必需
Namespace 的名称
- body: Patch,必需
-
dryRun (查询参数):string
-
fieldManager (查询参数):string
-
fieldValidation (查询参数):string
-
force (查询参数): boolean
-
pretty (查询参数):string
响应
200 (Namespace):OK
201 (Namespace):Created
401:Unauthorized
delete
删除一个 Namespace
HTTP 请求
DELETE /api/v1/namespaces/{name}
参数
-
name (路径参数):string,必需
Namespace 的名称
-
body: DeleteOptions
-
dryRun (查询参数):string
-
gracePeriodSeconds (查询参数):integer
-
pretty (查询参数):string
-
propagationPolicy (查询参数):string
响应
200 (Status):OK
202 (Status):Accepted
401:Unauthorized
2 - APIService
apiVersion: apiregistration.k8s.io/v1
import "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1"
APIService
APIService 是用来表示一个特定的 GroupVersion 的服务器。名称必须为 "version.group"。
-
apiVersion: apiregistration.k8s.io/v1
-
kind: APIService
-
metadata (ObjectMeta)
标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-
spec (APIServiceSpec)
spec 包含用于定位和与服务器通信的信息
-
status (APIServiceStatus)
status 包含某 API 服务器的派生信息
APIServiceSpec
APIServiceSpec 包含用于定位和与服务器通信的信息。仅支持 HTTPS 协议,但是你可以禁用证书验证。
-
groupPriorityMinimum (int32), 必需
groupPriorityMininum 是这个组至少应该具有的优先级。优先级高表示客户端优先选择该组。 请注意,该组的其他版本可能会指定更高的 groupPriorityMininum 值,使得整个组获得更高的优先级。 主排序基于 groupPriorityMinimum 值,从高到低排序(20 在 10 之前)。 次要排序基于对象名称的字母顺序(v1.bar 在 v1.foo 之前)。 我们建议这样配置:
*.k8s.io
(扩展除外)值设置为 18000,PaaS(OpenShift、Deis)建议值为 2000 左右。 -
versionPriority (int32), 必需
versionPriority 控制该 API 版本在其组中的排序,必须大于零。主排序基于 versionPriority, 从高到低排序(20 在 10 之前)。因为在同一个组里,这个数字可以很小,可能是几十。 在版本优先级相等的情况下,版本字符串将被用来计算组内的顺序。如果版本字符串是与 Kubernetes 的版本号形式类似, 则它将排序在 Kubernetes 形式版本字符串之前。Kubernetes 的版本号字符串按字典顺序排列。 Kubernetes 版本号以 “v” 字符开头,后面是一个数字(主版本),然后是可选字符串 “alpha” 或 “beta” 和另一个数字(次要版本)。 它们首先按 GA > beta > alpha 排序(其中 GA 是没有 beta 或 alpha 等后缀的版本),然后比较主要版本, 最后是比较次要版本。版本排序列表示例:v10、v2、v1、v11beta2、v10beta3、v3beta1、v12alpha1、v11alpha2、foo1、foo10。
-
caBundle ([]byte)
原子性:将在合并期间被替换
caBundle 是一个 PEM 编码的 CA 包,用于验证 API 服务器的服务证书。如果未指定, 则使用 API 服务器上的系统根证书。
-
group (string)
group 是此服务器主机的 API 组名称。
-
insecureSkipTLSVerify (boolean)
insecureSkipTLSVerify 代表在与此服务器通信时禁用 TLS 证书验证。强烈建议不要这样做。你应该使用 caBundle。
-
service (ServiceReference)
service 是对该 API 服务器的服务的引用。它只能在端口 443 上通信。如果 service 是 nil, 则意味着 API groupversion 的处理是在当前服务器上本地处理的。服务调用被直接委托给正常的处理程序链来完成。
ServiceReference 保存对 Service.legacy.k8s.io 的一个引用。
-
service.name (string)
name 是服务的名称
-
service.namespace (string)
namespace 是服务的命名空间
-
service.port (int32)
如果指定,则为托管 Webhook 的服务上的端口。为实现向后兼容,默认端口号为 443。
port
应该是一个有效的端口号(1-65535,包含)。
-
-
version (string)
version 是此服务器的 API 版本。例如:“v1”。
APIServiceStatus
APIServiceStatus 包含有关 API 服务器的派生信息
-
conditions ([]APIServiceCondition)
补丁策略:基于键
type
合并Map:合并时将保留 type 键的唯一值
APIService 的当前服务状态。
APIServiceCondition 描述 APIService 在特定点的状态
-
conditions.status (string), 必需
status 表示状况(Condition)的状态,取值为 True、False 或 Unknown 之一。
-
conditions.type (string), 必需
type 是状况的类型。
-
conditions.lastTransitionTime (Time)
上一次发生状况状态转换的时间。
Time 是对 time.Time 的封装。Time 支持对 YAML 和 JSON 进行正确封包。为 time 包的许多函数方法提供了封装器。
-
conditions.message (string)
指示上次转换的详细可读信息。
-
conditions.reason (string)
表述状况上次转换原因的、驼峰格式命名的、唯一的一个词。
-
APIServiceList
APIServiceList 是 APIService 对象的列表。
-
apiVersion: apiregistration.k8s.io/v1
-
kind: APIServiceList
-
metadata (ListMeta)
标准的列表元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-
items ([]APIService), 必需
items 是 APIService 的列表
Operations
get
读取指定的 APIService
HTTP 请求
GET /apis/apiregistration.k8s.io/v1/apiservices/{name}
参数
-
name (路径参数):string,必需
APIService 名称
-
pretty (查询参数):string
响应
200 (APIService): OK
401: Unauthorized
get
读取指定 APIService 的状态
HTTP 请求
GET /apis/apiregistration.k8s.io/v1/apiservices/{name}/status
参数
-
name (路径参数):string,必需
APIService 名称
-
pretty (查询参数):string
响应
200 (APIService): OK
401: Unauthorized
list
列出或观察 APIService 类的对象
HTTP 请求
GET /apis/apiregistration.k8s.io/v1/apiservices
参数
-
allowWatchBookmarks (查询参数):boolean
-
continue (查询参数):string
-
fieldSelector (查询参数):string
-
labelSelector (查询参数):string
-
limit (查询参数):integer
-
pretty (查询参数):string
-
resourceVersion (查询参数):string
-
resourceVersionMatch (查询参数):string
-
timeoutSeconds (查询参数):integer
-
watch (查询参数):boolean
响应
200 (APIServiceList): OK
401: Unauthorized
create
创建一个 APIService
HTTP 请求
POST /apis/apiregistration.k8s.io/v1/apiservices
参数
-
body:APIService, 必需
-
dryRun (查询参数):string
-
fieldManager (查询参数):string
-
fieldValidation (查询参数):string
-
pretty (查询参数):string
响应
200 (APIService): OK
201 (APIService): Created
202 (APIService): Accepted
401: Unauthorized
update
替换指定的 APIService
HTTP 请求
PUT /apis/apiregistration.k8s.io/v1/apiservices/{name}
参数
-
name (路径参数):string, 必需
APIService 名称
-
body:APIService, 必需
-
dryRun (查询参数):string
-
fieldManager (查询参数):string
-
fieldValidation (查询参数):string
-
pretty (查询参数):string
响应
200 (APIService): OK
201 (APIService): Created
401: Unauthorized
update
替换指定 APIService 的 status
HTTP 请求
PUT /apis/apiregistration.k8s.io/v1/apiservices/{name}/status
参数
-
name(路径参数):string, 必需
APIService 名称
-
body:APIService, 必需
-
dryRun (查询参数):string
-
fieldManager (查询参数):string
-
fieldValidation (查询参数):string
-
pretty (查询参数):string
响应
200 (APIService): OK
201 (APIService): Created
401: Unauthorized
patch
部分更新指定的 APIService
HTTP 请求
PATCH /apis/apiregistration.k8s.io/v1/apiservices/{name}
参数
-
name(路径参数):string, 必需
APIService 名称
-
body:Patch, 必需
-
dryRun (查询参数):string
-
fieldManager (查询参数):string
-
fieldValidation (查询参数):string
-
force (查询参数):boolean
-
pretty (查询参数):string
响应
200 (APIService): OK
201 (APIService): Created
401: Unauthorized
patch
部分更新指定 APIService 的 status
HTTP 请求
PATCH /apis/apiregistration.k8s.io/v1/apiservices/{name}/status
参数
-
name(路径参数):string, 必需
APIService 名称
-
body:Patch, 必需
-
dryRun (查询参数):string
-
fieldManager (查询参数):string
-
fieldValidation (查询参数):string
-
force (查询参数):boolean
-
pretty (查询参数):string
响应
200 (APIService): OK
201 (APIService): Created
401: Unauthorized
delete
删除一个 APIService
HTTP 请求
DELETE /apis/apiregistration.k8s.io/v1/apiservices/{name}
参数
-
name(路径参数):string, 必需
APIService 名称
-
body:DeleteOptions
-
dryRun (查询参数):string
-
gracePeriodSeconds (查询参数):integer
-
pretty (查询参数):string
-
propagationPolicy (查询参数):string
响应
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection
删除 APIService 集合
HTTP 请求
DELETE /apis/apiregistration.k8s.io/v1/apiservices
参数
-
body:DeleteOptions
-
continue (查询参数):string
-
dryRun (查询参数):string
-
fieldSelector (查询参数):string
-
gracePeriodSeconds (查询参数):integer
-
labelSelector (查询参数):string
-
limit (查询参数):integer
-
pretty (查询参数):string
-
propagationPolicy (查询参数):string
-
resourceVersion (查询参数):string
-
resourceVersionMatch (查询参数):string
-
timeoutSeconds (查询参数):integer
响应
200 (Status): OK
401: Unauthorized
3 - Lease
apiVersion: coordination.k8s.io/v1
import "k8s.io/api/coordination/v1"
Lease
Lease 定义了租约的概念。
-
apiVersion: coordination.k8s.io/v1
-
kind: Lease
-
metadata (ObjectMeta)
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- spec (LeaseSpec)
Lease 规范。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
LeaseSpec
LeaseSpec 是一个 Lease 的规范。
-
acquireTime (MicroTime)
acquireTime 是当前租约被获取的时间。
-
holderIdentity (string)
holderIdentity 包含当前租约持有人的身份。
-
leaseDurationSeconds (int32)
leaseDurationSeconds 是租约候选人需要等待强制获取租约的持续时间。这是相对于上次观察到的更新时间的度量。
-
leaseTransitions (int32)
LeasetTransitions 是租约持有人之间的转换次数。
-
renewTime (MicroTime)
renewTime 是当前租约持有人上次更新租约的时间。
LeaseList
LeaseList 是 Lease 对象的列表。
-
apiVersion: coordination.k8s.io/v1
-
kind: LeaseList
-
metadata (ListMeta)
标准列表元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
- items ([]Lease), required
Items 是架构对象的列表。
操作
get
读取指定的租赁
HTTP 请求
GET /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
参数
-
name (路径参数): string, 必需
Lease 名称
-
namespace (路径参数): string, 必需
-
pretty (查询参数): string
响应
200 (Lease): OK
401: Unauthorized
list
列出或监视 Lease 类对象
HTTP 请求
GET /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
参数
-
namespace (路径参数): string, 必需
-
allowWatchBookmarks (查询参数): boolean
-
continue (查询参数): string
-
fieldSelector (查询参数): string
-
labelSelector (查询参数): string
-
limit (查询参数): integer
-
pretty (查询参数): string
-
resourceVersion (查询参数): string
-
resourceVersionMatch (查询参数): string
-
timeoutSeconds (查询参数): integer
-
watch (查询参数): boolean
响应
200 (LeaseList): OK
401: Unauthorized
list
列出或监视 Lease 类对象
HTTP 请求
GET /apis/coordination.k8s.io/v1/leases
参数
-
allowWatchBookmarks (查询参数): boolean
-
continue (查询参数): string
-
fieldSelector (查询参数): string
-
labelSelector (查询参数): string
-
limit (查询参数): integer
-
pretty (查询参数): string
-
resourceVersion (查询参数): string
-
resourceVersionMatch (查询参数): string
-
timeoutSeconds (查询参数): integer
-
watch (查询参数): boolean
响应
200 (LeaseList): OK
401: Unauthorized
create
创建 Lease
HTTP 请求
POST /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
参数
-
namespace (路径参数): string, 必需
-
body: Lease, 必需
-
dryRun (查询参数): string
-
fieldManager (查询参数): string
-
fieldValidation (查询参数): string
-
pretty (查询参数): string
响应
200 (Lease): OK
201 (Lease): Created
202 (Lease): Accepted
401: Unauthorized
update
替换指定的 Lease
HTTP 请求
PUT /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
参数
-
name (路径参数): string, 必需
租贷名称
-
namespace (路径参数): string, 必需
-
body: Lease, 必需
-
dryRun (查询参数): string
-
fieldManager (查询参数): string
-
fieldValidation (查询参数): string
-
pretty (查询参数): string
响应
200 (Lease): OK
201 (Lease): Created
401: Unauthorized
patch
部分更新指定的 Lease
HTTP 请求
PATCH /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
参数
-
name (路径参数): string, 必需
租贷名称
-
namespace (路径参数): string, 必需
-
body: Patch, 必需
-
dryRun (查询参数): string
-
fieldManager (查询参数): string
-
fieldValidation (查询参数): string
-
force (查询参数): boolean
-
pretty (查询参数): string
响应
200 (Lease): OK
201 (Lease): Created
401: Unauthorized
delete
删除一个 Lease
HTTP 请求
DELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases/{name}
参数
-
name (路径参数): string, 必需
租贷的名称
-
namespace (路径参数): string, 必需
-
body: DeleteOptions
-
dryRun (查询参数): string
-
gracePeriodSeconds (查询参数): integer
-
pretty (查询参数): string
-
propagationPolicy (查询参数): string
响应
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection
删除 Lease 收款
HTTP 请求
DELETE /apis/coordination.k8s.io/v1/namespaces/{namespace}/leases
参数
-
namespace (路径参数): string, 必需
-
body: DeleteOptions
-
continue (查询参数): string
-
dryRun (查询参数): string
-
fieldSelector (查询参数): string
-
gracePeriodSeconds (查询参数): integer
-
labelSelector (查询参数): string
-
limit (查询参数): integer
-
pretty (查询参数): string
-
propagationPolicy (查询参数): string
-
resourceVersion (查询参数): string
-
resourceVersionMatch (查询参数): string
-
timeoutSeconds (查询参数): integer
响应
200 (Status): OK
401: Unauthorized
4 - 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/
-
apiVersion: node.k8s.io/v1
-
kind: RuntimeClass
-
metadata (ObjectMeta)
更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-
handler (string),必需
handler 指定底层运行时和配置,在 CRI 实现过程中将使用这些运行时和配置来处理这个类的 Pod。 可能的值特定于节点和 CRI 配置。 假定所有 handler 可用于每个节点上,且同一名称的 handler 在所有节点上是等效的。 例如,一个名为 “runc” 的 handler 可能指定 runc OCI 运行时将(使用原生 Linux 容器) 用于运行 Pod 中的容器。该 handler 必须采用小写,遵从 DNS Label (RFC 1123) 要求,且是不可变更的。
-
overhead (Overhead)
overhead 表示运行给定 RuntimeClass 的 Pod 时所关联的资源开销。有关更多详细信息,请参阅 https://kubernetes.io/zh-cn/docs/concepts/scheduling-eviction/pod-overhead/
Overhead 结构表示运行一个 Pod 所关联的资源开销。
-
overhead.podFixed (map[string]Quantity)
podFixed 表示与运行一个 Pod 所关联的资源开销。
-
-
scheduling (Scheduling)
scheduling 包含调度约束,这些约束用来确保以这个 RuntimeClass 运行的 Pod 被调度到支持此运行时类的节点。 如果 scheduling 设为空,则假定所有节点支持此 RuntimeClass。
Scheduling 指定支持 RuntimeClass 的节点的调度约束。
-
scheduling.nodeSelector (map[string]string)
nodeSelector 列出支持此 RuntimeClass 的节点上必须存在的标签。 使用此 RuntimeClass 的 Pod 只能调度到与这个选择算符匹配的节点上。 RuntimeClass nodeSelector 与 Pod 现有的 nodeSelector 合并。 任何冲突均会使得该 Pod 在准入时被拒绝。
-
scheduling.tolerations ([]Toleration)
原子性:将在合并期间被替换
tolerations 在准入期间追加到以此 RuntimeClass 运行的 Pod(不包括重复项)上, 本质上是求取 Pod 和 RuntimeClass 所容忍的节点并集。
附加此容忍度的 Pod 将容忍用匹配运算符
operator
运算后与三元组<key,value,effect>
匹配的任何污点。-
scheduling.tolerations.key (string)
key 是容忍度所应用到的污点键。空意味着匹配所有污点键。 如果键为空,则运算符必须为 Exists;这个组合意味着匹配所有值和所有键。
-
scheduling.tolerations.operator (string)
operator 表示一个键与值的关系。有效的运算符为 Exists 和 Equal。默认为 Equal。 Exists 等价于将值设置为通配符的情况,因此一个 Pod 可以容忍特定类别的所有污点。
-
scheduling.tolerations.value (string)
value 是容忍度匹配到的污点值。如果运算符为 Exists,则值应为空,否则就是一个普通字符串。
-
scheduling.tolerations.effect (string)
effect 表示匹配度污点效果。空意味着匹配所有污点效果。 当指定值时,允许的值为 NoSchedule、PreferNoSchedule 或 NoExecute。
-
scheduling.tolerations.tolerationSeconds (int64)
tolerationSeconds 表示容忍度容忍污点的时间段(必须是 NoExecute 的效果,否则忽略此字段)。 默认情况下,不设置此字段,这意味着永远容忍污点(不驱逐)。零和负值将被系统视为 0(立即驱逐)。
-
-
RuntimeClassList
RuntimeClassList 是 RuntimeClass 对象的列表。
-
apiVersion: node.k8s.io/v1
-
kind: RuntimeClassList
-
metadata (ListMeta)
标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-
items ([]RuntimeClass),必需
items 是 schema 对象的列表。
操作
get
读取指定的 RuntimeClass
HTTP 请求
GET /apis/node.k8s.io/v1/runtimeclasses/{name}
参数
-
name (路径参数): string,必需
RuntimeClass 的名称
-
pretty (查询参数): string
响应
200 (RuntimeClass): OK
401: Unauthorized
list
列出或监视 RuntimeClass 类别的对象
HTTP 请求
GET /apis/node.k8s.io/v1/runtimeclasses
参数
-
allowWatchBookmarks (查询参数): boolean
-
continue (查询参数): string
-
fieldSelector (查询参数): string
-
labelSelector (查询参数): string
-
limit (查询参数): integer
-
pretty (查询参数): string
-
resourceVersion (查询参数): string
-
resourceVersionMatch (查询参数): string
-
timeoutSeconds (查询参数): integer
-
watch (查询参数): boolean
响应
200 (RuntimeClassList): OK
401: Unauthorized
create
创建 RuntimeClass
HTTP 请求
POST /apis/node.k8s.io/v1/runtimeclasses
参数
-
body: RuntimeClass,必需
-
dryRun (查询参数): string
-
fieldManager (查询参数): string
-
fieldValidation (查询参数): string
-
pretty (查询参数): string
响应
200 (RuntimeClass): OK
201 (RuntimeClass): Created
202 (RuntimeClass): Accepted
401: Unauthorized
update
替换指定的 RuntimeClass
HTTP 请求
PUT /apis/node.k8s.io/v1/runtimeclasses/{name}
参数
-
name (路径参数): string,必需
RuntimeClass 的名称
-
body: RuntimeClass,必需
-
dryRun (查询参数): string
-
fieldManager (查询参数): string
-
fieldValidation (查询参数): string
-
pretty (查询参数): string
响应
200 (RuntimeClass): OK
201 (RuntimeClass): Created
401: Unauthorized
patch
部分更新指定的 RuntimeClass
HTTP 请求
PATCH /apis/node.k8s.io/v1/runtimeclasses/{name}
参数
-
name (路径参数): string,必需
RuntimeClass 的名称
-
body: Patch,必需
-
dryRun (查询参数): string
-
fieldManager (查询参数): string
-
fieldValidation (查询参数): string
-
force (查询参数): boolean
-
pretty (查询参数): string
响应
200 (RuntimeClass): OK
201 (RuntimeClass): Created
401: Unauthorized
delete
删除 RuntimeClass
HTTP 请求
DELETE /apis/node.k8s.io/v1/runtimeclasses/{name}
参数
-
name (路径参数): string,必需
RuntimeClass 的名称
-
body: DeleteOptions
-
dryRun (查询参数): string
-
gracePeriodSeconds (查询参数): integer
-
pretty (查询参数): string
-
propagationPolicy (查询参数): string
响应
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection
删除 RuntimeClass 的集合
HTTP 请求
DELETE /apis/node.k8s.io/v1/runtimeclasses
参数
-
body: DeleteOptions
-
continue (查询参数): string
-
dryRun (查询参数): string
-
fieldSelector (查询参数): string
-
gracePeriodSeconds (查询参数): integer
-
labelSelector (查询参数): string
-
limit (查询参数): integer
-
pretty (查询参数): string
-
propagationPolicy (查询参数): string
-
resourceVersion (查询参数): string
-
resourceVersionMatch (查询参数): string
-
timeoutSeconds (查询参数): integer
响应
200 (Status): OK
401: Unauthorized
5 - Binding
apiVersion: v1
import "k8s.io/api/core/v1"
Binding
Binding 将一个对象与另一个对象联系起来; 例如,一个 Pod 被调度程序绑定到一个节点。 已在 1.7 版本弃用,请使用 Pod 的 binding 子资源。
-
apiVersion: v1
-
kind: Binding
-
metadata (ObjectMeta)
标准对象的元数据, 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-
target (ObjectReference), 必需
要绑定到标准对象的目标对象。
操作
create
创建一个 Binding
HTTP 请求
POST /api/v1/namespaces/{namespace}/bindings
参数
-
dryRun (查询参数): string
-
fieldManager (查询参数): string
-
fieldValidation (查询参数): string
-
pretty (查询参数): string
响应
200 (Binding): OK
201 (Binding): Created
202 (Binding): Accepted
401: Unauthorized
create
创建 Pod 的绑定
HTTP 请求
POST /api/v1/namespaces/{namespace}/pods/{name}/binding
参数
-
dryRun (查询参数): string
-
fieldManager (查询参数): string
-
fieldValidation (查询参数): string
-
pretty (查询参数): string
响应
200 (Binding): OK
201 (Binding): Created
202 (Binding): Accepted
401: Unauthorized
6 - ComponentStatus
apiVersion: v1
import "k8s.io/api/core/v1"
ComponentStatus
ComponentStatus(和 ComponentStatusList)保存集群检验信息。 已废弃:该 API 在 v1.19 及更高版本中废弃。
-
apiVersion: v1
-
kind: ComponentStatus
-
metadata (ObjectMeta)
标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-
conditions ([]ComponentCondition)
补丁策略:基于键
type
合并观测到的组件状况的列表。
-
conditions.status (string),必需
组件状况的状态。“Healthy” 的有效值为:“True”、“False” 或 “Unknown”。
- conditions.type (string),必需
组件状况的类型。有效值:“Healthy”
-
conditions.error (string)
组件状况的错误码。例如,一个健康检查错误码。
-
conditions.message (string)
组件状况相关消息。例如,有关健康检查的信息。
-
ComponentStatusList
作为 ComponentStatus 对象列表,所有组件状况的状态。 已废弃:该 API 在 v1.19 及更高版本中废弃。
-
apiVersion: v1
-
kind: ComponentStatusList
-
metadata (ListMeta)
标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
-
items ([]ComponentStatus),必需
ComponentStatus 对象的列表。
操作
get
读取指定的 ComponentStatus
HTTP 请求
GET /api/v1/componentstatuses/{name}
参数
-
name (路径参数): string,必需
ComponentStatus 的名称
-
pretty (查询参数): string
响应
200 (ComponentStatus): OK
401: Unauthorized
list
列出 ComponentStatus 类别的对象
HTTP 请求
GET /api/v1/componentstatuses
参数
-
allowWatchBookmarks (查询参数): boolean
-
continue (查询参数): string
-
fieldSelector (查询参数): string
-
labelSelector (查询参数): string
-
limit (查询参数): integer
-
pretty (查询参数): string
-
resourceVersion (查询参数): string
-
resourceVersionMatch (查询参数): string
-
timeoutSeconds (查询参数): integer
-
watch (查询参数): boolean
响应
200 (ComponentStatusList): OK
401: Unauthorized