集群资源
- 1: APIService
- 2: ComponentStatus
- 3: Event
- 4: IPAddress
- 5: Lease
- 6: LeaseCandidate v1beta1
- 7: Namespace
- 8: Node
- 9: RuntimeClass
- 10: ServiceCIDR
1 - 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), 必需 groupPriorityMinimum 是这个组至少应该具有的优先级。优先级高表示客户端优先选择该组。 请注意,该组的其他版本可能会指定更高的 groupPriorityMinimum 值,使得整个组获得更高的优先级。 主排序基于 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 
- 
sendInitialEvents (查询参数): boolean 
- 
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 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean 
- 
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 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean 
- 
labelSelector (查询参数):string 
- 
limit (查询参数):integer 
- 
pretty (查询参数):string 
- 
propagationPolicy (查询参数):string 
- 
resourceVersion (查询参数):string 
- 
resourceVersionMatch (查询参数):string 
- 
sendInitialEvents (查询参数): boolean 
- 
timeoutSeconds (查询参数):integer 
响应
200 (Status): OK
401: Unauthorized
2 - 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合并Map:合并期间根据键 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 
- 
sendInitialEvents(查询参数):boolean 
- 
timeoutSeconds(查询参数):integer 
- 
watch(查询参数):boolean 
响应
200 (ComponentStatusList): OK
401: Unauthorized
3 - Event
apiVersion: events.k8s.io/v1
import "k8s.io/api/events/v1"
Event
Event 是集群中某个事件的报告。它一般表示系统的某些状态变化。 Event 的保留时间有限,触发器和消息可能会随着时间的推移而演变。 事件消费者不应假定给定原因的事件的时间所反映的是一致的下层触发因素,或具有该原因的事件的持续存在。 Events 应被视为通知性质的、尽最大努力而提供的补充数据。
- 
apiVersion: events.k8s.io/v1 
- 
kind: Event 
- 
metadata (ObjectMeta) 标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 
- 
eventTime (MicroTime),必需 evenTime 是该事件首次被观察到的时间。它是必需的。 MicroTime 是微秒级精度的 Time 版本 
- 
action (string) action 是针对相关对象所采取的或已失败的动作。字段值是机器可读的。对于新的 Event,此字段不能为空, 且最多为 128 个字符。 
- 
deprecatedCount (int32) deprecatedCount 是确保与 core.v1 Event 类型向后兼容的已弃用字段。 
- 
deprecatedFirstTimestamp (Time) deprecatedFirstTimestamp 是确保与 core.v1 Event 类型向后兼容的已弃用字段。 Time 是对 time.Time 的封装。Time 支持对 YAML 和 JSON 进行正确封包。为 time 包的许多函数方法提供了封装器。 
- 
deprecatedLastTimestamp (Time) deprecatedLastTimestamp 是确保与 core.v1 Event 类型向后兼容的已弃用字段。 Time 是对 time.Time 的封装。Time 支持对 YAML 和 JSON 进行正确封包。为 time 包的许多函数方法提供了封装器。 
- 
deprecatedSource (EventSource) deprecatedSource 是确保与 core.v1 Event 类型向后兼容的已弃用字段。 EventSource 包含事件信息。 - 
deprecatedSource.component (string) 生成事件的组件。 
- 
deprecatedSource.host (string) 产生事件的节点名称。 
 
- 
- 
note (string) note 是对该操作状态的可读描述。注释的最大长度是 1kB,但是库应该准备好处理最多 64kB 的值。 
- 
reason (string) reason 是采取行动的原因。它是人类可读的。对于新的 Event,此字段不能为空,且最多为128个字符。 
- 
regarding (ObjectReference) 关于包含此 Event 所涉及的对象。在大多数情况下,所指的是报告事件的控制器所实现的一个 Object。 例如 ReplicaSetController 实现了 ReplicaSet,这个事件被触发是因为控制器对 ReplicaSet 对象做了一些变化。 
- 
related (ObjectReference) related 是用于更复杂操作的、可选的、从属性的对象。例如,当 regarding 对象触发 related 对象的创建或删除时。 
- 
reportingController (string) reportingController 是触发该事件的控制器的名称,例如 kubernetes.io/kubelet。对于新的 Event,此字段不能为空。
- 
reportingInstance (string) reportingInstance 为控制器实例的 ID,例如 kubelet-xyzf。对于新的 Event,此字段不能为空,且最多为 128 个字符。
- 
series (EventSeries) series 是该事件代表的事件系列的数据,如果是单事件,则为 nil。 EventSeries 包含一系列事件的信息,即一段时间内持续发生的事情。 EventSeries 的更新频率由事件报告者决定。 默认事件报告程序在 "k8s.io/client-go/tools/events/event_broadcaster.go" 展示在发生心跳时该结构如何被更新,可以指导定制的报告者实现。 - 
series.count (int32),必需 count 是到最后一次心跳时间为止在该系列中出现的次数。 
 
- 
- 
type (string) type 是该事件的类型(Normal、Warning),未来可能会添加新的类型。字段值是机器可读的。 对于新的 Event,此字段不能为空。 
EventList
EventList 是一个 Event 对象列表。
- 
apiVersion: events.k8s.io/v1 
- 
kind: EventList 
- 
metadata (ListMeta) 标准的列表元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 
- 
items ([]Event),必需 items 是模式(Schema)对象的列表。 
操作
get 读取特定 Event
HTTP 请求
GET /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}
参数
- 
name (路径参数):string,必需 Event 名称 
- 
namespace (路径参数):string,必需 
- 
pretty (路径参数):string 
响应
200 (Event): OK
401: Unauthorized
list 列出或观察事件类型对象
HTTP 请求
GET /apis/events.k8s.io/v1/namespaces/{namespace}/events
参数
- 
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 (EventList): OK
401: Unauthorized
list 列出或观察事件类型对象
HTTP 请求
GET /apis/events.k8s.io/v1/events
参数
- 
allowWatchBookmarks (查询参数):boolean 
- 
continue (查询参数):string 
- 
fieldSelector (查询参数):string 
- 
labelSelector (查询参数):string 
- 
limit (查询参数):integer 
- 
pretty (查询参数):string 
- 
resourceVersion (查询参数):string 
- 
resourceVersionMatch (查询参数):string 
- 
sendInitialEvents (查询参数): boolean 
- 
timeoutSeconds (查询参数):integer 
- 
watch (查询参数):boolean 
响应
200 (EventList): OK
401: Unauthorized
create 创建一个 Event
HTTP 请求
POST /apis/events.k8s.io/v1/namespaces/{namespace}/events
参数
- 
namespace (查询参数):string,必需 
- body: Event,必需
- 
dryRun (查询参数):string 
- 
fieldManager (查询参数):string 
- 
fieldValidation (查询参数):string 
- 
pretty (查询参数):string 
响应
200 (Event): OK
201 (Event): Created
202 (Event): Accepted
401: Unauthorized
update 替换指定 Event
HTTP 请求
PUT /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}
参数
- 
name (路径参数):string,必需 Event 名称 
- 
namespace (路径参数):string,必需 
- body:Event,必需
- 
dryRun (查询参数):必需 
- 
fieldManager (查询参数):string 
- 
fieldValidation (查询参数):string 
- 
pretty (查询参数):string 
响应
200 (Event): OK
201 (Event): Created
401: Unauthorized
patch 部分更新指定的 Event
HTTP 请求
PATCH /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}
参数
- 
name (路径参数):string,必需 Event 名称 
- 
namespace (路径参数):string,必需 
- body: Patch,必需
- 
dryRun (查询参数):string 
- 
fieldManager (查询参数):string 
- 
fieldValidation (查询参数):string 
- 
force (查询参数):boolean 
- 
pretty (查询参数):string 
响应
200 (Event): OK
201 (Event): Created
401: Unauthorized
delete 删除 Event
HTTP 请求
DELETE /apis/events.k8s.io/v1/namespaces/{namespace}/events/{name}
参数
- 
name (路径参数):string,必需 Event 名称 
- 
namespace (路径参数):string,必需 
- 
body: DeleteOptions 
- 
dryRun (查询参数):string 
- 
gracePeriodSeconds (查询参数):integer 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean 
- 
pretty (查询参数):string 
- 
propagationPolicy (查询参数):string 
响应
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection 删除 Event 集合
HTTP 请求
DELETE /apis/events.k8s.io/v1/namespaces/{namespace}/events
参数
- 
namespace (in path):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): OK
401: Unauthorized
4 - IPAddress
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。
- 
apiVersion: networking.k8s.io/v1 
- 
kind: IPAddress 
- 
metadata (ObjectMeta) 标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 
- 
spec (IPAddressSpec) spec 是 IPAddress 的预期状态。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 
IPAddressSpec
IPAddressSpec 描述 IP 地址中的属性。
- 
parentRef (ParentReference),必需 parentRef 引用挂接 IPAddress 的资源。IPAddress 必须引用一个父对象。 - 
parentRef.name (string),必需 name 是被引用的对象的名称。 
- 
parentRef.resource (string),必需 resource 是被引用的对象的资源。 
 - 
parentRef.group (string) group 是被引用的对象的组。 
- 
parentRef.namespace (string) namespace 是被引用的对象的名字空间。 
 
- 
IPAddressList
IPAddressList 包含 IPAddress 的列表。
- 
apiVersion: networking.k8s.io/v1 
- 
kind: IPAddressList 
- 
metadata (ListMeta) 标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 
- 
items ([]IPAddress),必需 items 是 IPAddresses 的列表。 
操作
get 读取指定的 IPAddress
HTTP 请求
GET /apis/networking.k8s.io/v1/ipaddresses/{name}
参数
- 
name(路径参数):string,必需 IPAddress 的名称。 
- 
pretty(查询参数):string 
响应
200 (IPAddress): OK
401: Unauthorized
list 列举或监视类别为 IPAddress 的对象
HTTP 请求
GET /apis/networking.k8s.io/v1/ipaddresses
参数
- 
allowWatchBookmarks(查询参数):boolean 
- 
continue(查询参数):string 
- 
fieldSelector(查询参数):string 
- 
labelSelector(查询参数):string 
- 
limit(查询参数):integer 
- 
pretty(查询参数):string 
- 
resourceVersion(查询参数):string 
- 
resourceVersionMatch(查询参数):string 
- 
sendInitialEvents(查询参数):boolean 
- 
timeoutSeconds(查询参数):integer 
- 
watch(查询参数):boolean 
响应
200 (IPAddressList): OK
401: Unauthorized
create 创建 IPAddress
HTTP 请求
POST /apis/networking.k8s.io/v1/ipaddresses
参数
- 
body: IPAddress,必需 
- 
dryRun(查询参数):string 
- 
fieldManager(查询参数):string 
- 
fieldValidation(查询参数):string 
- 
pretty(查询参数):string 
响应
200 (IPAddress): OK
201 (IPAddress): Created
202 (IPAddress): Accepted
401: Unauthorized
update 替换指定的 IPAddress
HTTP 请求
PUT /apis/networking.k8s.io/v1/ipaddresses/{name}
参数
- 
name(路径参数):string,必需 IPAddress 的名称。 
- 
body: IPAddress,必需 
- 
dryRun(查询参数):string 
- 
fieldManager(查询参数):string 
- 
fieldValidation(查询参数):string 
- 
pretty(查询参数):string 
响应
200 (IPAddress): OK
201 (IPAddress): Created
401: Unauthorized
patch 部分更新指定的 IPAddress
HTTP 请求
PATCH /apis/networking.k8s.io/v1/ipaddresses/{name}
参数
- 
name(路径参数):string,必需 IPAddress 的名称。 
- 
body: Patch,必需 
- 
dryRun(查询参数):string 
- 
fieldManager(查询参数):string 
- 
fieldValidation(查询参数):string 
- 
force(查询参数):boolean 
- 
pretty(查询参数):string 
响应
200 (IPAddress): OK
201 (IPAddress): Created
401: Unauthorized
delete 删除 IPAddress
HTTP 请求
DELETE /apis/networking.k8s.io/v1/ipaddresses/{name}
参数
- 
name(路径参数):string,必需 IPAddress 的名称。 
- 
body: DeleteOptions 
- 
dryRun(查询参数):string 
- 
gracePeriodSeconds(查询参数):integer 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean 
- 
pretty(查询参数):string 
- 
propagationPolicy(查询参数):string 
响应
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection 删除 IPAddress 的集合
HTTP 请求
DELETE /apis/networking.k8s.io/v1/ipaddresses
参数
- 
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): OK
401: Unauthorized
5 - 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) spec 包含 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 包含当前租约持有人的身份。 如果使用协调领导者选举(Coordinated Leader Election), 则持有人身份必须等于选举出的 LeaseCandidate.metadata.name 字段。 
- 
leaseDurationSeconds (int32) leaseDurationSeconds 是租约候选人需要等待强制获取租约的持续时间。 这是相对于上次观察到的 renewTime 的度量。 
- 
leaseTransitions (int32) leaseTransitions 是租约持有人之间的转换次数。 
- 
preferredHolder (string) preferredHolder 向租约持有人发出信号,提示此租约出现一个更优的持有人且应该被放弃。 此字段仅在设置了 strategy时才能被设置。
- 
renewTime (MicroTime) renewTime 是当前租约持有人上次更新租约的时间。 
- 
strategy(字符串) strategy 指示为协调领导者选举选择领导者的策略。 如果此字段未被指定,则此租约没有主动的协调。 (Alpha)使用此字段需要启用 CoordinatedLeaderElection 特性门控。 
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),必需 items 是架构对象的列表。 
操作
get 读取指定的 Lease
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 
- 
sendInitialEvents (查询参数): boolean 
- 
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 
- 
sendInitialEvents (查询参数): boolean 
- 
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,必需 Lease 的名称。 
- 
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,必需 Lease 的名称。 
- 
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,必需 Lease 的名称。 
- 
namespace (路径参数): string,必需 
- 
body: DeleteOptions 
- 
dryRun (查询参数): string 
- 
gracePeriodSeconds (查询参数): integer 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean 
- 
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 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean 
- 
labelSelector (查询参数): string 
- 
limit (查询参数): integer 
- 
pretty (查询参数): string 
- 
propagationPolicy (查询参数): string 
- 
resourceVersion (查询参数): string 
- 
resourceVersionMatch (查询参数): string 
- 
sendInitialEvents (查询参数): boolean 
- 
timeoutSeconds (查询参数): integer 
响应
200 (Status): OK
401: Unauthorized
6 - LeaseCandidate v1beta1
apiVersion: coordination.k8s.io/v1beta1
import "k8s.io/api/coordination/v1beta1"
LeaseCandidate
LeaseCandidate 定义一个 Lease 对象的候选者。 通过创建候选者,协同式领导者选举能够从候选者列表中选出最佳的领导者。
- 
apiVersion: coordination.k8s.io/v1beta1 
- 
kind: LeaseCandidate 
- 
metadata (ObjectMeta) 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 
- 
spec (LeaseCandidateSpec) spec 包含 Lease 的规约。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 
LeaseCandidateSpec
LeaseCandidateSpec 是 Lease 的规约。
- 
binaryVersion (string),必需 binaryVersion 是可执行文件的版本。它必须采用不带前缀 v的语义版本格式。 此字段是必需的。
- 
leaseName (string),必需 leaseName 是此候选者正在争夺的租约的名称。此字段是不可变更的。 
- 
strategy (string),必需 strategy 是协调式领导者选举中用于选择领导者的策略。 如果多个候选者针对同一个 Lease 返回了不同的策略,则将采用 binaryVersion 最新的候选者所提供的策略。 如果仍存在冲突,则视为用户错误,协调式领导者选举将不会继续操作此 Lease,直到冲突被解决。 
- 
emulationVersion (string) emulationVersion 是仿真版本。它必须采用不带前缀 v的语义版本格式。 emulationVersion 必须小于或等于 binaryVersion。 当策略为 "OldestEmulationVersion" 时,此字段是必需的。
pingTime 是服务器最近一次请求 LeaseCandidate 续订的时间。 此操作仅在领导者选举期间进行,用以检查是否有 LeaseCandidates 变得不合格。 当 pingTime 更新时,LeaseCandidate 会通过更新 renewTime 来响应。
- 
renewTime (MicroTime) renewTime 是 LeaseCandidate 被最近一次更新的时间。每当 Lease 需要进行领导者选举时, pingTime 字段会被更新,以向 LeaseCandidate 发出应更新 renewTime 的信号。 如果自上次续订以来已经过去几个小时,旧的 LeaseCandidate 对象也会被垃圾收集。 pingTime 字段会被定期更新,以防止对仍处于活动状态的 LeaseCandidates 进行垃圾收集。 
LeaseCandidateList
LeaseCandidateList 是 Lease 对象的列表。
- 
apiVersion: coordination.k8s.io/v1beta1 
- 
kind: LeaseCandidateList 
- 
metadata (ListMeta) 标准的列表元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 
- 
items ([]LeaseCandidate),必需 items 是模式对象的列表。 
操作
get 读取指定的 LeaseCandidate
HTTP 请求
GET /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
参数
- 
name (路径参数): string,必需 LeaseCandidate 的名称。 
- 
namespace (路径参数): string,必需 
- 
pretty (查询参数): string 
响应
200 (LeaseCandidate): OK
401: Unauthorized
list 列举或监视类别为 LeaseCandidate 的对象
HTTP 请求
GET /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates
参数
- 
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 (LeaseCandidateList): OK
401: Unauthorized
list 列举或监视类别为 LeaseCandidate 的对象
HTTP 请求
GET /apis/coordination.k8s.io/v1beta1/leasecandidates
参数
- 
allowWatchBookmarks (查询参数): boolean 
- 
continue (查询参数): string 
- 
fieldSelector (查询参数): string 
- 
labelSelector (查询参数): string 
- 
limit (查询参数): integer 
- 
pretty (查询参数): string 
- 
resourceVersion (查询参数): string 
- 
resourceVersionMatch (查询参数): string 
- 
sendInitialEvents (查询参数): boolean 
- 
timeoutSeconds (查询参数): integer 
- 
watch (查询参数): boolean 
响应
200 (LeaseCandidateList): OK
401: Unauthorized
create 创建 LeaseCandidate
HTTP 请求
POST /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates
参数
- 
namespace (路径参数): string,必需 
- 
body: LeaseCandidate,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
pretty (查询参数): string 
响应
200 (LeaseCandidate): OK
201 (LeaseCandidate): Created
202 (LeaseCandidate): Accepted
401: Unauthorized
update 替换指定的 LeaseCandidate
HTTP 请求
PUT /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
参数
- 
name (路径参数): string,必需 LeaseCandidate 的名称。 
- 
namespace (路径参数): string,必需 
- 
body: LeaseCandidate,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
pretty (查询参数): string 
响应
200 (LeaseCandidate): OK
201 (LeaseCandidate): Created
401: Unauthorized
patch 部分更新指定的 LeaseCandidate
HTTP 请求
PATCH /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
参数
- 
name (路径参数): string,必需 LeaseCandidate 的名称。 
- 
namespace (路径参数): string,必需 
- 
body: Patch,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
force (查询参数): boolean 
- 
pretty (查询参数): string 
响应
200 (LeaseCandidate): OK
201 (LeaseCandidate): Created
401: Unauthorized
delete 删除 LeaseCandidate
HTTP 请求
DELETE /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates/{name}
参数
- 
name (路径参数): string,必需 LeaseCandidate 的名称。 
- 
namespace (路径参数): string,必需 
- 
body: DeleteOptions 
- 
dryRun (查询参数): string 
- 
gracePeriodSeconds (查询参数): integer 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean 
- 
pretty (查询参数): string 
- 
propagationPolicy (查询参数): string 
响应
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection 删除 LeaseCandidate 的集合
HTTP 请求
DELETE /apis/coordination.k8s.io/v1beta1/namespaces/{namespace}/leasecandidates
参数
- 
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): OK
401: Unauthorized
7 - 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/zh-cn/docs/tasks/administer-cluster/namespaces/ 原子性:将在合并期间被替换 
NamespaceStatus
NamespaceStatus 表示 Namespace 的当前状态信息。
- 
conditions ([]NamespaceCondition) 补丁策略:基于 type健合并Map:键 type的唯一值将在合并期间保留表示命名空间当前状态的最新可用状况。 NamespaceCondition 包含命名空间状态的详细信息。 - 
conditions.status (string),必需 状况(condition)的状态,取值为 True、False 或 Unknown 之一。 
 - conditions.type (string), 必需
 命名空间控制器状况的类型。 
- 
- 
phase (string) phase 是命名空间的当前生命周期阶段。更多信息: https://kubernetes.io/zh-cn/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/zh-cn/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 
- 
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 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数):boolean 
- 
pretty (查询参数):string 
- 
propagationPolicy (查询参数):string 
响应
200 (Status):OK
202 (Status):Accepted
401:Unauthorized
8 - Node
apiVersion: v1
import "k8s.io/api/core/v1"
Node
Node 是 Kubernetes 中的工作节点。 每个节点在缓存中(即在 etcd 中)都有一个唯一的标识符。
- 
apiVersion: v1 
- 
kind: Node 
- 
metadata (ObjectMeta) 标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 
- 
spec (NodeSpec) spec 定义节点的行为。 https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 
- 
status (NodeStatus) 此节点的最近观测状态。由系统填充。只读。 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 
NodeSpec
NodeSpec 描述了创建节点时使用的属性。
- 
configSource (NodeConfigSource) 已弃用:以前用于为 DynamicKubeletConfig 功能指定节点配置的来源。此功能已删除。 NodeConfigSource 指定节点配置的来源。指定一个子字段(不包括元数据)必须为非空。 此 API 自 1.22的版本起已被弃用 - 
configSource.configMap (ConfigMapNodeConfigSource) ConfigMap 是对 Node 的 ConfigMap 的引用。 ConfigMapNodeConfigSource 包含引用某 ConfigMap 作为节点配置源的信息。 此 API 自 1.22 版本起已被弃用:https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration - 
configSource.configMap.kubeletConfigKey (string),必需 kubeletConfigKey 声明所引用的 ConfigMap 的哪个键对应于 KubeletConfiguration 结构体, 该字段在所有情况下都是必需的。 
 - 
configSource.configMap.name (string),必需 name 是被引用的 ConfigMap 的 metadata.name。 此字段在所有情况下都是必需的。 
 - 
configSource.configMap.namespace (string),必需 namespace 是所引用的 ConfigMap 的 metadata.namespace。 此字段在所有情况下都是必需的。 
- 
configSource.configMap.resourceVersion (string) resourceVersion 是所引用的 ConfigMap 的 metadata.resourceVersion。 该字段在 Node.spec 中是禁止的,在 Node.status 中是必需的。 
- 
configSource.configMap.uid (string) uid 是所引用的 ConfigMap 的 metadata.uid。 该字段在 Node.spec 中是禁止的,在 Node.status 中是必需的。 
 
- 
 
- 
- 
externalID (string) 已弃用。并非所有 kubelet 都会设置此字段。 1.13 的版本之后会删除该字段。参见:https://issues.k8s.io/61966 
- 
podCIDR (string) podCIDR 表示分配给节点的 Pod IP 范围。 
- 
podCIDRs ([]string) 集合:唯一值将在合并期间被保留 podCIDRs 表示分配给节点以供该节点上的 Pod 使用的 IP 范围。 如果指定了该字段,则第 0 个条目必须与 podCIDR 字段匹配。 对于 IPv4 和 IPv6,它最多可以包含 1 个值。 
- 
providerID (string) 云提供商分配的节点ID,格式为:<ProviderName>://<ProviderSpecificNodeID> 
- 
taints ([]Taint) 原子:将在合并期间被替换 如果设置了,则为节点的污点。 此污点附加到的节点对任何不容忍污点的 Pod 都有“影响”。 - 
taints.effect (string),必需 必需的。污点对不容忍污点的 Pod 的影响。合法的 effect 值有 NoSchedule、PreferNoSchedule和NoExecute。
 
- 
- 
unschedulable (boolean) unschedulable 控制新 Pod 的节点可调度性。 默认情况下,节点是可调度的。 更多信息:https://kubernetes.io/zh-cn/docs/concepts/architecture/nodes/#manual-node-administration 
NodeStatus
NodeStatus 是有关节点当前状态的信息。
- 
addresses ([]NodeAddress) 补丁策略:根据 type键执行合并操作Map:键 type的唯一值将在合并期间保留节点可到达的地址列表。从云提供商处查询(如果有)。 更多信息:https://kubernetes.io/zh-cn/docs/reference/node/node-status/#addresses 注意:该字段声明为可合并,但合并键不够唯一,合并时可能导致数据损坏。 调用者应改为使用完全替换性质的补丁操作。 有关示例,请参见 https://pr.k8s.io/79391。 消费者应假设地址可以在节点的生命期内发生变化。 然而在一些例外情况下这是不可能的,例如在自身状态中继承 Node 地址的 Pod 或 downward API ( status.hostIP) 的消费者。NodeAddress 包含节点地址的信息。 - 
addresses.address (string),必需 节点地址。 
 - 
addresses.type (string),必需 节点地址类型,Hostname、ExternalIP 或 InternalIP 之一。 
 
- 
- 
allocatable (map[string]Quantity) allocatable 表示节点的可用于调度的资源。默认为容量。 
- 
capacity (map[string]Quantity) capacity 代表一个节点的总资源。更多信息: https://kubernetes.io/zh-cn/docs/reference/node/node-status/#capacity 
- 
conditions ([]NodeCondition) 补丁策略:根据 type键执行合并操作Map:键 type的唯一值将在合并期间保留conditions 是当前观测到的节点状况的数组。 更多信息:https://kubernetes.io/zh-cn/docs/reference/node/node-status/#condition NodeCondition 包含节点状况的信息。 - 
conditions.status (string),必需 状况的状态为 True、False、Unknown 之一。 
 - 
conditions.type (string),必需 节点状况的类型。 
- 
conditions.lastHeartbeatTime (Time) 给定状况最近一次更新的时间。 Time 是 time.Time的包装器,它支持对 YAML 和 JSON 的正确编组。 time 包的许多工厂方法提供了包装器。
- 
conditions.lastTransitionTime (Time) 状况最近一次从一种状态转换到另一种状态的时间。 Time 是 time.Time的包装器,它支持对 YAML 和 JSON 的正确编组。 time 包的许多工厂方法提供了包装器。
- 
conditions.message (string) 指示有关上次转换详细信息的人类可读消息。 
- 
conditions.reason (string) (简要)状况最后一次转换的原因。 
 
- 
- 
config (NodeConfigStatus) 通过动态 kubelet 配置功能分配给节点的配置状态。 NodeConfigStatus 描述了由 Node.spec.configSource 分配的配置的状态。 - 
config.active (NodeConfigSource) active 报告节点正在使用的检查点配置。 active 将代表已分配配置的当前版本或当前 LastKnownGood 配置,具体取决于尝试使用已分配配置是否会导致错误。 NodeConfigSource 指定节点配置的来源。指定一个子字段(不包括元数据)必须为非空。此 API 自 1.22 版本起已弃用 - 
config.active.configMap (ConfigMapNodeConfigSource) configMap 是对 Node 的 ConfigMap 的引用。 ConfigMapNodeConfigSource 包含引用某 ConfigMap 作为节点配置源的信息。 此 API 自 1.22 版本起已被弃用:https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration - 
config.active.configMap.kubeletConfigKey (string),必需 kubeletConfigKey 声明所引用的 ConfigMap 的哪个键对应于 KubeletConfiguration 结构体, 该字段在所有情况下都是必需的。 
 - 
config.active.configMap.name (string),必需 name 是所引用的 ConfigMap 的 metadata.name。 此字段在所有情况下都是必需的。
 - 
config.active.configMap.namespace (string),必需 namespace 是所引用的 ConfigMap 的 metadata.namespace。 此字段在所有情况下都是必需的。
- 
config.active.configMap.resourceVersion (string) resourceVersion 是所引用的 ConfigMap 的 metadata.resourceVersion。 该字段在Node.spec中是禁止的,在Node.status中是必需的。
- 
config.active.configMap.uid (string) uid 是所引用的 ConfigMap 的 metadata.uid。 该字段在 Node.spec 中是禁止的,在 Node.status 中是必需的。 
 
- 
 
- 
- 
config.assigned (NodeConfigSource) assigned 字段报告节点将尝试使用的检查点配置。 当 Node.spec.configSource被更新时,节点将所关联的配置负载及指示预期配置的记录通过检查点操作加载到本地磁盘。 节点参考这条记录来选择它的配置检查点,并在 assigned 中报告这条记录。 仅在记录被保存到磁盘后才会更新 status 中的 assigned。 当 kubelet 重新启动时,它会尝试通过加载和验证由 assigned 标识的检查点有效负载来使 assigned 配置成为 active 配置。NodeConfigSource 指定节点配置的来源。指定一个子字段(不包括元数据)必须为非空。 此 API 自 1.22 版本起已弃用 - 
config.assigned.configMap (ConfigMapNodeConfigSource) configMap 是对 Node 的 ConfigMap 的引用。 ConfigMapNodeConfigSource 包含引用某 ConfigMap 为节点配置源的信息。 此 API 自 1.22 版本起已被弃用:https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration - 
config.assigned.configMap.kubeletConfigKey (string),必需 kubeletConfigKey 声明所引用的 ConfigMap 的哪个键对应于 KubeletConfiguration 结构体, 该字段在所有情况下都是必需的。 
 - 
config.assigned.configMap.name (string),必需 name 是所引用的 ConfigMap 的 metadata.name。 此字段在所有情况下都是必需的。
 - 
config.assigned.configMap.namespace (string),必需 namespace 是所引用的 ConfigMap 的 metadata.namespace。 此字段在所有情况下都是必需的。
- 
config.assigned.configMap.resourceVersion (string) resourceVersion 是所引用的 ConfigMap 的 metadata.resourceVersion。 该字段在Node.spec中是禁止的,在Node.status中是必需的。
- 
config.assigned.configMap.uid (string) uid 是所引用的 ConfigMap 的 metadata.uid。 该字段在Node.spec中是禁止的,在Node.status中是必需的。
 
- 
 
- 
- 
config.error (string) error 描述了在 spec.configSource与活动配置间协调时发生的所有问题。 可能会发生的情况,例如,尝试将spec.configSource通过检查点操作复制到到本地 assigned 记录时, 尝试对与spec.configSource关联的有效负载执行检查点操作,尝试加载或验证 assigned 的配置时。 同步配置时可能会在不同位置发生错误,较早的错误(例如下载或检查点错误)不会导致回滚到 LastKnownGood, 并且可能会在 kubelet 重试后解决。 后期发生的错误(例如加载或验证检查点配置)将导致回滚到 LastKnownGood。 在后一种情况下,通常可以通过修复spec.sonfigSource中 assigned 配置来解决错误。 你可以通过在 kubelet 日志中搜索错误消息来找到更多的调试信息。 error 是错误状态的人类可读描述;机器可以检查 error 是否为空,但不应依赖跨 kubelet 版本的 error 文本的稳定性。
- 
config.lastKnownGood (NodeConfigSource) lastKnownGood 报告节点在尝试使用 assigned 配置时遇到错误时将回退到的检查点配置。 当节点确定 assigned 配置稳定且正确时,assigned 配置会成为 lastKnownGood 配置。 这当前实施为从更新分配配置的本地记录开始的 10 分钟浸泡期。 如果在此期间结束时分配的配置依旧处于活动状态,则它将成为 lastKnownGood。 请注意,如果 spec.configSource重置为 nil(使用本地默认值),lastKnownGood也会立即重置为 nil,因为始终假定本地默认配置是好的。 你不应该对节点确定配置稳定性和正确性的方法做出假设,因为这可能会在将来发生变化或变得可配置。NodeConfigSource 指定节点配置的来源。指定一个子字段(不包括元数据)必须为非空。此 API 自 1.22 版本起已弃用 - 
config.lastKnownGood.configMap (ConfigMapNodeConfigSource) configMap 是对 Node 的 ConfigMap 的引用。 ConfigMapNodeConfigSource 包含引用某 ConfigMap 作为节点配置源的信息。 此 API 自 1.22 版本起已被弃用:https://git.k8s.io/enhancements/keps/sig-node/281-dynamic-kubelet-configuration - 
config.lastKnownGood.configMap.kubeletConfigKey (string),必需 kubeletConfigKey 声明所引用的 ConfigMap 的哪个键对应于 KubeletConfiguration 结构体, 该字段在所有情况下都是必需的。 
 - 
config.lastKnownGood.configMap.name (string),必需 name 是所引用的 ConfigMap 的 metadata.name。 此字段在所有情况下都是必需的。
 - 
config.lastKnownGood.configMap.namespace (string),必需 namespace 是所引用的 ConfigMap 的 metadata.namespace。 此字段在所有情况下都是必需的。
- 
config.lastKnownGood.configMap.resourceVersion (string) resourceVersion 是所引用的 ConfigMap 的 metadata.resourceVersion。 该字段在 Node.spec 中是禁止的,在 Node.status 中是必需的。 
- 
config.lastKnownGood.configMap.uid (string) uid 是所引用的 ConfigMap 的 metadata.uid。 该字段在 Node.spec 中是禁止的,在 Node.status 中是必需的。 
 
- 
 
- 
 
- 
- 
daemonEndpoints (NodeDaemonEndpoints) 在节点上运行的守护进程的端点。 NodeDaemonEndpoints 列出了节点上运行的守护进程打开的端口。 
- 
features (NodeFeatures) features 描述由 CRI 实现所实现的一组特性。 NodeFeatures 描述由 CRI 实现所实现的一组特性。 NodeFeatures 中包含的特性应仅依赖于 CRI 实现,而与运行时处理程序无关。 - 
features.supplementalGroupsPolicy (boolean) 如果运行时支持 SupplementalGroupsPolicy 和 ContainerUser,则将 supplementalGroupsPolicy 设置为 true。 
 
- 
- 
images ([]ContainerImage) 原子:将在合并期间被替换 该节点上的容器镜像列表。 描述一个容器镜像 - 
images.names ([]string) 原子:将在合并期间被替换 已知此镜像的名称。 例如 ["kubernetes.example/hyperkube:v1.0.7", "cloud-vendor.registry.example/cloud-vendor/hyperkube:v1.0.7"] 
- 
images.sizeBytes (int64) 镜像的大小(以字节为单位)。 
 
- 
- 
nodeInfo (NodeSystemInfo) 用于唯一标识节点的 ids/uuids 集。 更多信息:https://kubernetes.io/zh-cn/docs/reference/node/node-status/#info NodeSystemInfo 是一组用于唯一标识节点的 ids/uuids。 - 
nodeInfo.architecture (string),必需 节点报告的 architecture。 
 - 
nodeInfo.bootID (string),必需 节点报告的 bootID。 
 - 
nodeInfo.containerRuntimeVersion (string),必需 节点通过运行时远程 API 报告的 ContainerRuntime 版本(例如 containerd://1.4.2)。 
 - 
nodeInfo.kernelVersion (string),必需 节点来自 “uname -r” 报告的内核版本(例如 3.16.0-0.bpo.4-amd64)。 
 - 
nodeInfo.kubeProxyVersion (string),必需 已弃用:节点报告的 KubeProxy 版本。 
 - 
nodeInfo.kubeletVersion (string),必需 节点报告的 kubelet 版本。 
 - 
nodeInfo.machineID (string),必需 节点上报的 machineID。 对于集群中的唯一机器标识,此字段是首选。 从 man(5) machine-id 了解更多信息:http://man7.org/linux/man-pages/man5/machine-id.5.html 
 - 
nodeInfo.operatingSystem (string),必需 节点上报的操作系统。 
 - 
nodeInfo.osImage (string),必需 节点从 /etc/os-release 报告的操作系统映像(例如 Debian GNU/Linux 7 (wheezy))。 
 - 
nodeInfo.systemUUID (string),必需 节点报告的 systemUUID。 对于唯一的机器标识 MachineID 是首选。 此字段特定于 Red Hat 主机 https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/uuid 
 
- 
- 
phase (string) NodePhase 是最近观测到的节点的生命周期阶段。 更多信息:https://kubernetes.io/zh-cn/docs/concepts/architecture/nodes/#phase 该字段从未填充,现在已被弃用。 
- 
runtimeHandlers ([]NodeRuntimeHandler) 原子:将在合并期间被替换 可用的运行时处理程序。 NodeRuntimeHandler 是一组运行时处理程序信息。 - 
runtimeHandlers.features (NodeRuntimeHandlerFeatures) 支持的特性。 NodeRuntimeHandlerFeatures 是由运行时处理程序所实现的一组特性。 - 
runtimeHandlers.features.recursiveReadOnlyMounts (boolean) 如果运行时处理程序支持 RecursiveReadOnlyMounts,则将 recursiveReadOnlyMounts 设置为 true。 
- 
runtimeHandlers.features.userNamespaces (boolean) 如果运行时处理程序支持包括数据卷所用的 UserNamespaces,则将 userNamespaces 设置为 true。 
 
- 
 - 
runtimeHandlers.name (string) 运行时处理程序名称。默认运行时处理程序为空。 
 
- 
- 
volumesAttached ([]AttachedVolume) 原子:将在合并期间被替换 附加到节点的卷的列表。 AttachedVolume 描述附加到节点的卷 - 
volumesAttached.devicePath (string),必需 devicePath 表示卷应该可用的设备路径。 
 - 
volumesAttached.name (string),必需 附加卷的名称。 
 
- 
- 
volumesInUse ([]string) 节点正在使用(安装)的可附加卷的列表。 
NodeList
NodeList 是已注册到 master 的所有节点的完整列表。
- 
apiVersion: v1 
- 
kind: NodeList 
- 
metadata (ListMeta) 标准的列表元数据。 更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds 
- 
items ([]Node),必需 节点的列表。 
操作
get 读取指定节点
HTTP 请求
GET /api/v1/nodes/{name}
参数
- 
name (路径参数): string,必需 节点的名称。 
- 
pretty (路径参数): string 
响应
200 (Node): OK
401: Unauthorized
get 读取指定节点的状态
HTTP 请求
GET /api/v1/nodes/{name}/status
参数
- 
name (路径参数): string,必需 节点的名称。 
- 
pretty (查询参数): string 
响应
200 (Node): OK
401: Unauthorized
list 列出或监视节点类型的对象
HTTP 请求
GET /api/v1/nodes
参数
- 
allowWatchBookmarks (查询参数): boolean 
- 
continue (查询参数): string 
- 
fieldSelector (查询参数): string 
- 
labelSelector (查询参数): string 
- 
limit (查询参数): integer 
- 
pretty (查询参数): string 
- 
resourceVersion (查询参数): string 
- 
resourceVersionMatch (查询参数): string 
- 
sendInitialEvents (查询参数): boolean 
- 
timeoutSeconds (查询参数): integer 
- 
watch (查询参数): boolean 
响应
200 (NodeList): OK
401: Unauthorized
create 创建一个节点
HTTP 请求
POST /api/v1/nodes
参数
- 
body: Node,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
pretty (查询参数): string 
响应
200 (Node): OK
201 (Node): Created
202 (Node): Accepted
401: Unauthorized
update 替换指定节点
HTTP 请求
PUT /api/v1/nodes/{name}
参数
- 
name (路径参数): string,必需 节点的名称。 
- 
body: Node,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
pretty (查询参数): string 
响应
200 (Node): OK
201 (Node): Created
401: Unauthorized
update 替换指定节点的状态
HTTP 请求
PUT /api/v1/nodes/{name}/status
参数
- 
name (路径参数): string,必需 节点的名称。 
- 
body: Node,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
pretty (查询参数): string 
响应
200 (Node): OK
201 (Node): Created
401: Unauthorized
patch 部分更新指定节点
HTTP 请求
PATCH /api/v1/nodes/{name}
参数
- 
name (路径参数): string,必需 节点的名称。 
- 
body: Patch,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
force (查询参数): boolean 
- 
pretty (查询参数): string 
响应
200 (Node): OK
201 (Node): Created
401: Unauthorized
patch 部分更新指定节点的状态
HTTP 请求
PATCH /api/v1/nodes/{name}/status
参数
- 
name (路径参数): string,必需 节点的名称。 
- 
body: Patch,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
force (查询参数): boolean 
- 
pretty (查询参数): string 
响应
200 (Node): OK
201 (Node): Created
401: Unauthorized
delete 删除一个节点
HTTP 请求
DELETE /api/v1/nodes/{name}
参数
- 
name (路径参数): string,必需 节点的名称。 
- 
body: DeleteOptions 
- 
dryRun (查询参数): string 
- 
gracePeriodSeconds (查询参数): integer 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean 
- 
pretty (查询参数): string 
- 
propagationPolicy (查询参数): string 
响应
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection 删除节点的集合
HTTP 请求
DELETE /api/v1/nodes
- 
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): OK
401: Unauthorized
9 - 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 
- 
sendInitialEvents (查询参数): boolean 
- 
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 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean 
- 
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 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean 
- 
labelSelector (查询参数): string 
- 
limit (查询参数): integer 
- 
pretty (查询参数): string 
- 
propagationPolicy (查询参数): string 
- 
resourceVersion (查询参数): string 
- 
resourceVersionMatch (查询参数): string 
- 
sendInitialEvents (查询参数): boolean 
- 
timeoutSeconds (查询参数): integer 
响应
200 (Status): OK
401: Unauthorized
10 - ServiceCIDR
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。
- 
apiVersion: networking.k8s.io/v1 
- 
kind: ServiceCIDR 
- 
metadata (ObjectMeta) 标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 
- 
spec (ServiceCIDRSpec) spec 是 ServiceCIDR 的期望状态。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 
- 
status (ServiceCIDRStatus) status 表示 ServiceCIDR 的当前状态。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status 
ServiceCIDRSpec
ServiceCIDRSpec 定义用户想要为 Service 分配 ClusterIP 所用的 CIDR。
- 
cidrs ([]string) 原子:将在合并期间被替换 cidrs 以 CIDR 表示法定义 IP 块(例如 "192.168.0.0/24" 或 "2001:db8::/64"), 从此 IP 块中为 Service 分配集群 IP。允许最多两个 CIDR,每个 IP 簇一个 CIDR。此字段是不可变更的。 
ServiceCIDRStatus
ServiceCIDRStatus 描述 ServiceCIDR 的当前状态。
- 
conditions ([]Condition) 补丁策略:基于键 type合并Map:合并时将保留 type 键的唯一值 conditions 包含一个 metav1.Condition 数组,描述 ServiceCIDR 的状态。 condition 包含此 API 资源某一方面当前状态的详细信息。 - 
conditions.lastTransitionTime (Time),必需 lastTransitionTime 是状况最近一次状态转化的时间。 变化应该发生在下层状况发生变化的时候。如果不知道下层状况发生变化的时间, 那么使用 API 字段更改的时间是可以接受的。 Time 是 time.Time 的包装类,支持正确地序列化为 YAML 和 JSON。 为 time 包提供的许多工厂方法提供了包装类。 
 - 
conditions.message (string),必需 message 是人类可读的消息,有关转换的详细信息,可以是空字符串。 
- 
conditions.reason (string),必需 reason 包含一个程序标识符,指示 condition 最后一次转换的原因。 特定状况类型的生产者可以定义该字段的预期值和含义,以及这些值是否被视为有保证的 API。 此值应该是 CamelCase 字符串且不能为空。 
 - 
conditions.status (string),必需 condition 的状态,可选值为 True、False、Unknown 之一。 
- 
conditions.type (string),必需 CamelCase 或 foo.example.com/CamelCase 中的条件类型。 
- 
conditions.observedGeneration (int64) observedGeneration 表示设置 condition 基于的 .metadata.generation 的过期次数。 例如,如果 .metadata.generation 当前为 12,但 .status.conditions[x].observedGeneration 为 9, 则 condition 相对于实例的当前状态已过期。 
 
- 
ServiceCIDRList
ServiceCIDRList 包含 ServiceCIDR 对象的列表。
- 
apiVersion: networking.k8s.io/v1 
- 
kind: ServiceCIDRList 
- 
metadata (ListMeta) 标准的对象元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata 
- 
items ([]ServiceCIDR),必需 items 是 ServiceCIDR 的列表。 
操作
get 读取指定的 ServiceCIDR
HTTP
GET /apis/networking.k8s.io/v1/servicecidrs/{name}
参数
- 
name (路径参数): string,必需 ServiceCIDR 的名称。 
- 
pretty (查询参数): string 
响应
200 (ServiceCIDR): OK
401: Unauthorized
get 读取指定的 ServiceCIDR 的状态
HTTP 请求
GET /apis/networking.k8s.io/v1/servicecidrs/{name}/status
参数
- 
name (路径参数): string,必需 ServiceCIDR 的名称。 
- 
pretty (查询参数): string 
响应
200 (ServiceCIDR): OK
401: Unauthorized
list 列举或监视 ServiceCIDR 类别的对象
HTTP 请求
GET /apis/networking.k8s.io/v1/servicecidrs
参数
- 
allowWatchBookmarks (查询参数): boolean 
- 
continue (查询参数): string 
- 
fieldSelector (查询参数): string 
- 
labelSelector (查询参数): string 
- 
limit (查询参数): integer 
- 
pretty (查询参数): string 
- 
resourceVersion (查询参数): string 
- 
resourceVersionMatch (查询参数): string 
- 
sendInitialEvents (查询参数): boolean 
- 
timeoutSeconds (查询参数): integer 
- 
watch (查询参数): boolean 
响应
200 (ServiceCIDRList): OK
401: Unauthorized
create 创建 ServiceCIDR
HTTP 请求
POST /apis/networking.k8s.io/v1/servicecidrs
参数
- 
body: ServiceCIDR,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
pretty (查询参数): string 
响应
200 (ServiceCIDR): OK
201 (ServiceCIDR): Created
202 (ServiceCIDR): Accepted
401: Unauthorized
update 替换指定的 ServiceCIDR
HTTP 请求
PUT /apis/networking.k8s.io/v1/servicecidrs/{name}
参数
- 
name (路径参数): string,必需 ServiceCIDR 的名称。 
- 
body: ServiceCIDR,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
pretty (查询参数): string 
响应
200 (ServiceCIDR): OK
201 (ServiceCIDR): Created
401: Unauthorized
update 替换指定的 ServiceCIDR 的状态
HTTP 请求
PUT /apis/networking.k8s.io/v1/servicecidrs/{name}/status
参数
- 
name (路径参数): string,必需 ServiceCIDR 的名称。 
- 
body: ServiceCIDR,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
pretty (查询参数): string 
响应
200 (ServiceCIDR): OK
201 (ServiceCIDR): Created
401: Unauthorized
patch 部分更新指定的 ServiceCIDR
HTTP 请求
PATCH /apis/networking.k8s.io/v1/servicecidrs/{name}
参数
- 
name (路径参数): string,必需 ServiceCIDR 的名称。 
- 
body: Patch,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
force (查询参数): boolean 
- 
pretty (查询参数): string 
响应
200 (ServiceCIDR): OK
201 (ServiceCIDR): Created
401: Unauthorized
patch 部分更新指定的 ServiceCIDR 的状态
HTTP 请求
PATCH /apis/networking.k8s.io/v1/servicecidrs/{name}/status
参数
- 
name (路径参数): string,必需 ServiceCIDR 的名称。 
- 
body: Patch,必需 
- 
dryRun (查询参数): string 
- 
fieldManager (查询参数): string 
- 
fieldValidation (查询参数): string 
- 
force (查询参数): boolean 
- 
pretty (查询参数): string 
响应
200 (ServiceCIDR): OK
201 (ServiceCIDR): Created
401: Unauthorized
delete 删除 ServiceCIDR
HTTP 请求
DELETE /apis/networking.k8s.io/v1/servicecidrs/{name}
参数
- 
name (路径参数): string,必需 ServiceCIDR 的名称。 
- 
body: DeleteOptions 
- 
dryRun (查询参数): string 
- 
gracePeriodSeconds (查询参数): integer 
- 
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean 
- 
pretty (查询参数): string 
- 
propagationPolicy (查询参数): string 
响应
200 (Status): OK
202 (Status): Accepted
401: Unauthorized
deletecollection 删除 ServiceCIDR 的集合
HTTP 请求
DELETE /apis/networking.k8s.io/v1/servicecidrs
参数
- 
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): OK
401: Unauthorized