这是本节的多页打印视图。 点击此处打印.

返回本页常规视图.

集群资源

1 - Namespace

Namespace 为名字提供作用域。

apiVersion: v1

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

Namespace

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


NamespaceSpec

NamespaceSpec 用于描述 Namespace 的属性。


NamespaceStatus

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


  • conditions ([]NamespaceCondition)

    补丁策略:基于 type 健合并

    表示命名空间当前状态的最新可用状况。

    NamespaceCondition 包含命名空间状态的详细信息。

    • conditions.status (string),必需

      状况(condition)的状态,取值为 True、False 或 Unknown 之一。

    • conditions.type (string), 必需

    命名空间控制器状况的类型。

    • conditions.lastTransitionTime (Time)

      **Time 是对 time.Time 的封装。Time 支持对 YAML 和 JSON 进行正确封包。为 time 包的许多函数方法提供了封装器。**
      
    • conditions.message (string)

    • conditions.reason (string)

  • phase (string)

    phase 是命名空间的当前生命周期阶段。更多信息: https://kubernetes.io/docs/tasks/administer-cluster/namespaces/

NamespaceList

NamespaceList 是一个命名空间列表。


操作


get 读取指定的 Namespace

HTTP 请求

GET /api/v1/namespaces/{name}

参数

  • name (路径参数):string,必需

    Namespace 的名称

  • pretty (查询参数):string

    pretty

响应

200 (Namespace):OK

401:Unauthorized

get 读取指定 Namespace 的状态

HTTP 请求

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

参数

  • name (路径参数):string,必需

    Namespace 的名称

  • pretty (查询参数):string

    pretty

响应

200 (Namespace):OK

401:Unauthorized

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

HTTP 请求

GET /api/v1/namespaces

参数

  • continue (查询参数):string

    continue

  • limit (查询参数):integer

    limit

  • pretty (查询参数):string

    pretty

  • watch (查询参数):boolean

    watch

响应

200 (NamespaceList):OK

401:Unauthorized

create 创建一个 Namespace

HTTP 请求

POST /api/v1/namespaces

参数

  • dryRun (查询参数):string

    dryRun

  • pretty (查询参数):string

    pretty

响应

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

    dryRun

  • pretty (查询参数):string

    pretty

响应

200 (Namespace):OK

201 (Namespace):Created

401:Unauthorized

update 替换指定 Namespace 的终结器

HTTP 请求

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

参数

  • name (路径参数):string,必需

    Namespace 的名称

  • body: Namespace,必需

  • dryRun (查询参数):string

    dryRun

  • pretty (查询参数):string

    pretty

响应

200 (Namespace):OK

201 (Namespace):Created

401:Unauthorized

update 替换指定 Namespace 的状态

HTTP 请求

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

参数

  • name (路径阐述):string,必需

    Namespace 的名称

  • body: Namespace,必需

  • dryRun (查询参数):string

    dryRun

  • pretty (查询参数):string

    pretty

响应

200 (Namespace):OK

201 (Namespace):Created

401: Unauthorized

patch 部分更新指定的 Namespace

HTTP 请求

PATCH /api/v1/namespaces/{name}

参数

  • name (路径参数):string,必需

    Namespace 的名称

  • dryRun (查询参数):string

    dryRun

  • force (查询参数):boolean

    force

  • pretty (查询参数): string

    pretty

响应

200 (Namespace):OK

201 (Namespace):Created

401: Unauthorized

patch 部分更新指定 Namespace 的状态

HTTP 请求

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

参数

  • name (路径参数):string,必需

    Namespace 的名称

  • dryRun (查询参数):string

    dryRun

  • force (查询参数): boolean

    force

  • pretty (查询参数):string

    pretty

响应

200 (Namespace):OK

201 (Namespace):Created

401:Unauthorized

delete 删除一个 Namespace

HTTP 请求

DELETE /api/v1/namespaces/{name}

参数

  • name (路径参数):string,必需

    Namespace 的名称

  • body: DeleteOptions

  • dryRun (查询参数):string

    dryRun

  • pretty (查询参数):string

    pretty

响应

200 (Status):OK

202 (Status):Accepted

401:Unauthorized

2 - APIService

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

apiVersion: apiregistration.k8s.io/v1

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

APIService

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


APIServiceSpec

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


  • 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 对象的列表。


Operations


get 读取指定的 APIService

HTTP 请求

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

参数

  • name路径参数):string,必需

    APIService 名称

  • pretty查询参数):string

    pretty

响应

200 (APIService): OK

401: Unauthorized

get 读取指定 APIService 的状态

HTTP 请求

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

参数

  • name路径参数):string,必需

    APIService 名称

  • pretty查询参数):string

    pretty

响应

200 (APIService): OK

401: Unauthorized

list 列出或观察 APIService 类的对象

HTTP 请求

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

参数

响应

200 (APIServiceList): OK

401: Unauthorized

create 创建一个 APIService

HTTP 请求

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

参数

响应

200 (APIService): OK

201 (APIService): Created

202 (APIService): Accepted

401: Unauthorized

update 替换指定的 APIService

HTTP 请求

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

参数

  • name 路径参数):string, 必需

    APIService 名称

  • bodyAPIService必需

  • dryRun 查询参数):string

    dryRun

  • fieldManager 查询参数):string

    fieldManager

  • fieldValidation 查询参数):string

    fieldValidation

  • pretty 查询参数):string

    pretty

响应

200 (APIService): OK

201 (APIService): Created

401: Unauthorized

update 替换指定 APIService 的 status

HTTP 请求

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

参数

  • name路径参数):string, 必需

    APIService 名称

  • bodyAPIService必需

  • dryRun 查询参数):string

    dryRun

  • fieldManager 查询参数):string

    fieldManager

  • fieldValidation 查询参数):string

    fieldValidation

  • pretty 查询参数):string

    pretty

响应

200 (APIService): OK

201 (APIService): Created

401: Unauthorized

patch 部分更新指定的 APIService

HTTP 请求

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

参数

  • name路径参数):string, 必需

    APIService 名称

  • bodyPatch必需

  • dryRun 查询参数):string

    dryRun

  • fieldManager 查询参数):string

    fieldManager

  • fieldValidation 查询参数):string

    fieldValidation

  • force 查询参数):boolean

    force

  • pretty 查询参数):string

    pretty

响应

200 (APIService): OK

201 (APIService): Created

401: Unauthorized

patch 部分更新指定 APIService 的 status

HTTP 请求

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

参数

  • name路径参数):string, 必需

    APIService 名称

  • bodyPatch必需

  • dryRun 查询参数):string

    dryRun

  • fieldManager 查询参数):string

    fieldManager

  • fieldValidation 查询参数):string

    fieldValidation

  • force 查询参数):boolean

    force

  • pretty 查询参数):string

    pretty

响应

200 (APIService): OK

201 (APIService): Created

401: Unauthorized

delete 删除一个 APIService

HTTP 请求

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

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 APIService 集合

HTTP 请求

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

参数

响应

200 (Status): OK

401: Unauthorized

3 - Lease

Lease defines a lease concept.

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

Lease 规范。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status

LeaseSpec

LeaseSpec 是一个 Lease 的规范。


  • acquireTime (MicroTime)

    acquireTime 是当前租约被获取的时间。

    MicroTime 是微秒级精确时间的版本。

  • holderIdentity (string)

    holderIdentity 包含当前租约持有人的身份。

  • leaseDurationSeconds (int32)

    leaseDurationSeconds 是租约候选人需要等待强制获取租约的持续时间。这是相对于上次观察到的更新时间的度量。

  • leaseTransitions (int32)

    LeasetTransitions 是租约持有人之间的转换次数。

  • renewTime (MicroTime)

    renewTime 是当前租约持有人上次更新租约的时间。

    MicroTime 是具有微秒级精度的时间版本。

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, 必需

    namespace

  • pretty (查询参数): string

    pretty

响应

200 (Lease): OK

401: Unauthorized

list 列出或监视 Lease 类对象

HTTP 请求

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

参数

响应

200 (LeaseList): OK

401: Unauthorized

list 列出或监视 Lease 类对象

HTTP 请求

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

参数

响应

200 (LeaseList): OK

401: Unauthorized

create 创建 Lease

HTTP 请求

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

参数

响应

200 (Lease): OK

201 (Lease): Created

202 (Lease): Accepted

401: Unauthorized

update 替换指定的 Lease

HTTP 请求

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

参数

  • name (路径参数): string, 必需

    租贷名称

  • namespace (路径参数): string, 必需

    namespace

  • body: Lease, 必需

  • dryRun (查询参数): string

    dryRun

  • fieldManager (查询参数): string

    fieldManager

  • fieldValidation (查询参数): string

    fieldValidation

  • pretty (查询参数): string

    pretty

响应

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, 必需

    namespace

  • body: Patch, 必需

  • dryRun (查询参数): string

    dryRun

  • fieldManager (查询参数): string

    fieldManager

  • fieldValidation (查询参数): string

    fieldValidation

  • force (查询参数): boolean

    force

  • pretty (查询参数): string

    pretty

响应

200 (Lease): OK

201 (Lease): Created

401: Unauthorized

delete 删除一个 Lease

HTTP 请求

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

参数

响应

200 (Status): OK

202 (Status): Accepted

401: Unauthorized

deletecollection 删除 Lease 收款

HTTP 请求

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

参数

响应

200 (Status): OK

401: Unauthorized

4 - Binding

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

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

参数

响应

200 (Binding): OK

201 (Binding): Created

202 (Binding): Accepted

401: Unauthorized

create 创建 Pod 的绑定

HTTP 请求

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

参数

  • name (路径参数): string, 必需

    Binding 的名称

  • namespace (路径参数): string, 必需

    namespace

  • body: Binding, 必需

响应

200 (Binding): OK

201 (Binding): Created

202 (Binding): Accepted

401: Unauthorized