apiVersion: resource.k8s.io/v1beta2
import "k8s.io/api/resource/v1beta2"
ResourceClaimTemplate {#ResourceClaimTemplate}
ResourceClaimTemplate 用于生成 ResourceClaim 对象。
这是一个 Alpha 类型的特性,需要启用 DynamicResourceAllocation 特性门控。
<hr>
-
apiVersion: resource.k8s.io/v1beta2
-
kind: ResourceClaimTemplate
-
metadata (<a href="">ObjectMeta</a>)
标准的对象元数据。
-
spec (<a href="">ResourceClaimTemplateSpec</a>),必需
描述要生成的 ResourceClaim。
该字段是不可变的。当需要时,控制平面将为 Pod 创建一个 ResourceClaim,然后不再对其进行更新。
ResourceClaimTemplateSpec {#ResourceClaimTemplateSpec}
ResourceClaimTemplateSpec 包含针对 ResourceClaim 的元数据和字段。
<hr>
-
spec (<a href="">ResourceClaimSpec</a>),必需
ResourceClaim 的规约。整个内容将不加修改地复制到从模板创建的 ResourceClaim 中。 与 ResourceClaim 中相同的字段在此处也是有效的。
-
metadata (<a href="">ObjectMeta</a>)
ObjectMeta 可以包含创建 PVC 时将要复制到其中的标签和注解。 不允许设置其他字段,并且即便设置了也会在验证期间被拒绝。
ResourceClaimTemplateList {#ResourceClaimTemplateList}
ResourceClaimTemplateList 是申领模板的集合。
<hr>
-
apiVersion: resource.k8s.io/v1beta2
-
kind: ResourceClaimTemplateList
-
metadata (<a href="">ListMeta</a>)
标准的列表元数据。
-
items ([]<a href="">ResourceClaimTemplate</a>),必需
items 是资源申领模板的列表。
操作 {#Operations}
<hr>
get 读取指定的 ResourceClaimTemplate
HTTP 请求
GET /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}
参数
-
name (路径参数): string,必需
ResourceClaimTemplate 的名称。
-
namespace (路径参数): string,必需
<a href="">namespace</a>
-
pretty (查询参数): string
<a href="">pretty</a>
响应
200 (<a href="">ResourceClaimTemplate</a>): OK
401: Unauthorized
list 列举或监视 ResourceClaimTemplate 类别的对象
HTTP 请求
GET /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates
参数
-
namespace (路径参数): string,必需
<a href="">namespace</a>
-
allowWatchBookmarks (查询参数): boolean
<a href="">allowWatchBookmarks</a>
-
continue (查询参数): string
<a href="">continue</a>
-
fieldSelector (查询参数): string
<a href="">fieldSelector</a>
-
labelSelector (查询参数): string
<a href="">labelSelector</a>
-
limit (查询参数): integer
<a href="">limit</a>
-
pretty (查询参数): string
<a href="">pretty</a>
-
resourceVersion (查询参数): string
<a href="">resourceVersion</a>
-
resourceVersionMatch (查询参数): string
<a href="">resourceVersionMatch</a>
-
sendInitialEvents (查询参数): boolean
<a href="">sendInitialEvents</a>
-
timeoutSeconds (查询参数): integer
<a href="">timeoutSeconds</a>
-
watch (查询参数): boolean
<a href="">watch</a>
响应
200 (<a href="">ResourceClaimTemplateList</a>): OK
401: Unauthorized
list 列举或监视 ResourceClaimTemplate 类别的对象
HTTP 请求
GET /apis/resource.k8s.io/v1beta2/resourceclaimtemplates
参数
-
allowWatchBookmarks (查询参数): boolean
<a href="">allowWatchBookmarks</a>
-
continue (查询参数): string
<a href="">continue</a>
-
fieldSelector (查询参数): string
<a href="">fieldSelector</a>
-
labelSelector (查询参数): string
<a href="">labelSelector</a>
-
limit (查询参数): integer
<a href="">limit</a>
-
pretty (查询参数): string
<a href="">pretty</a>
-
resourceVersion (查询参数): string
<a href="">resourceVersion</a>
-
resourceVersionMatch (查询参数): string
<a href="">resourceVersionMatch</a>
-
sendInitialEvents (查询参数): boolean
<a href="">sendInitialEvents</a>
-
timeoutSeconds (查询参数): integer
<a href="">timeoutSeconds</a>
-
watch (查询参数): boolean
<a href="">watch</a>
响应
200 (<a href="">ResourceClaimTemplateList</a>): OK
401: Unauthorized
create 创建 ResourceClaimTemplate
HTTP 请求
POST /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates
参数
-
namespace (路径参数): string,必需
<a href="">namespace</a>
-
body: <a href="">ResourceClaimTemplate</a>,必需
-
dryRun (查询参数): string
<a href="">dryRun</a>
-
fieldManager (查询参数): string
<a href="">fieldManager</a>
-
fieldValidation (查询参数): string
<a href="">fieldValidation</a>
-
pretty (查询参数): string
<a href="">pretty</a>
响应
200 (<a href="">ResourceClaimTemplate</a>): OK
201 (<a href="">ResourceClaimTemplate</a>): Created
202 (<a href="">ResourceClaimTemplate</a>): Accepted
401: Unauthorized
update 替换指定的 ResourceClaimTemplate
HTTP 请求
PUT /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}
参数
-
name (路径参数): string,必需
ResourceClaimTemplate 的名称。
-
namespace (路径参数): string,必需
<a href="">namespace</a>
-
body: <a href="">ResourceClaimTemplate</a>,必需
-
dryRun (查询参数): string
<a href="">dryRun</a>
-
fieldManager (查询参数): string
<a href="">fieldManager</a>
-
fieldValidation (查询参数): string
<a href="">fieldValidation</a>
-
pretty (查询参数): string
<a href="">pretty</a>
响应
200 (<a href="">ResourceClaimTemplate</a>): OK
201 (<a href="">ResourceClaimTemplate</a>): Created
401: Unauthorized
patch 部分更新指定的 ResourceClaimTemplate
HTTP 请求
PATCH /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}
参数
-
name (路径参数): string,必需
ResourceClaimTemplate 的名称。
-
namespace (路径参数): string,必需
<a href="">namespace</a>
-
body: <a href="">Patch</a>,必需
-
dryRun (查询参数): string
<a href="">dryRun</a>
-
fieldManager (查询参数): string
<a href="">fieldManager</a>
-
fieldValidation (查询参数): string
<a href="">fieldValidation</a>
-
force (查询参数): boolean
<a href="">force</a>
-
pretty (查询参数): string
<a href="">pretty</a>
响应
200 (<a href="">ResourceClaimTemplate</a>): OK
201 (<a href="">ResourceClaimTemplate</a>): Created
401: Unauthorized
delete 删除 ResourceClaimTemplate
HTTP 请求
DELETE /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates/{name}
参数
-
name (路径参数): string,必需
ResourceClaimTemplate 的名称。
-
namespace (路径参数): string,必需
<a href="">namespace</a>
-
body: <a href="">DeleteOptions</a>
-
dryRun (查询参数): string
<a href="">dryRun</a>
-
gracePeriodSeconds (查询参数): integer
<a href="">gracePeriodSeconds</a>
-
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean
<a href="">ignoreStoreReadErrorWithClusterBreakingPotential</a>
-
pretty (查询参数): string
<a href="">pretty</a>
-
propagationPolicy (查询参数): string
<a href="">propagationPolicy</a>
响应
200 (<a href="">ResourceClaimTemplate</a>): OK
202 (<a href="">ResourceClaimTemplate</a>): Accepted
401: Unauthorized
deletecollection 删除 ResourceClaimTemplate 的集合
HTTP 请求
DELETE /apis/resource.k8s.io/v1beta2/namespaces/{namespace}/resourceclaimtemplates
参数
-
namespace (路径参数): string,必需
<a href="">namespace</a>
-
body: <a href="">DeleteOptions</a>
-
continue (查询参数): string
<a href="">continue</a>
-
dryRun (查询参数): string
<a href="">dryRun</a>
-
fieldSelector (查询参数): string
<a href="">fieldSelector</a>
-
gracePeriodSeconds (查询参数): integer
<a href="">gracePeriodSeconds</a>
-
ignoreStoreReadErrorWithClusterBreakingPotential (查询参数): boolean
<a href="">ignoreStoreReadErrorWithClusterBreakingPotential</a>
-
labelSelector (查询参数): string
<a href="">labelSelector</a>
-
limit (查询参数): integer
<a href="">limit</a>
-
pretty (查询参数): string
<a href="">pretty</a>
-
propagationPolicy (查询参数): string
<a href="">propagationPolicy</a>
-
resourceVersion (查询参数): string
<a href="">resourceVersion</a>
-
resourceVersionMatch (查询参数): string
<a href="">resourceVersionMatch</a>
-
sendInitialEvents (查询参数): boolean
<a href="">sendInitialEvents</a>
-
timeoutSeconds (查询参数): integer
<a href="">timeoutSeconds</a>
响应
200 (<a href="">Status</a>): OK
401: Unauthorized
来源:Kubernetes 文档贡献者 · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。
