StorageClass
apiVersion: storage.k8s.io/v1
import "k8s.io/api/storage/v1"
StorageClass
StorageClass 描述了一类存储的参数,PersistentVolumes 可以针对这类存储进行动态供给。
StorageClass 是非 Namespace 范围的;etcd 中存储的 StorageClass 名称位于 ObjectMeta.Name 中。
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata (ObjectMeta)
标准对象的元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
provisioner (string),必需
provisioner 指示 Provisioner 的类型。
allowVolumeExpansion (boolean)
allowVolumeExpansion 指示 StorageClass 是否允许卷扩展。
allowedTopologies ([]TopologySelectorTerm)
原子性:将在合并期间被替换
allowedTopologies 限制了卷可以被动态供给的节点拓扑。每个卷插件定义了其支持的拓扑规范。空的 TopologySelectorTerm 列表意味着没有拓扑限制。该字段仅在启用了 VolumeScheduling 特性的服务器上受支持。
拓扑选择器项表示标签查询的结果。null 或空的拓扑选择器项不匹配任何对象。它们的条件是 AND 逻辑。它提供了 NodeSelectorTerm 功能的一个子集。这是一项 Alpha 功能,将来可能会发生变化。
allowedTopologies.matchLabelExpressions ([]TopologySelectorLabelRequirement)
原子性:将在合并期间被替换
按标签列出的拓扑选择器要求列表。
拓扑选择器要求是一个匹配给定标签的选择器。这是一项 Alpha 功能,将来可能会发生变化。
allowedTopologies.matchLabelExpressions.key (string),必需
选择器适用的标签键。
allowedTopologies.matchLabelExpressions.values ([]string),必需
原子性:将在合并期间被替换
字符串值数组。其中一个值必须与标签匹配才能被选中。Values 中的每个条目都通过 OR 逻辑组合。
mountOptions ([]string)
原子性:将在合并期间被替换
mountOptions 控制此 StorageClass 动态供给的 PersistentVolumes 的挂载选项。例如 ["ro", "soft"]。未经验证 - 如果选项无效,PV 的挂载将直接失败。
parameters (map[string]string)
parameters 包含应为该 StorageClass 创建卷的 Provisioner 参数。
reclaimPolicy (string)
reclaimPolicy 控制此 StorageClass 动态供给的 PersistentVolumes 的回收策略。默认为 Delete。
volumeBindingMode (string)
volumeBindingMode 指示 PersistentVolumeClaims 如何被供给和绑定。未设置时,使用 VolumeBindingImmediate。该字段仅在启用了 VolumeScheduling 特性的服务器上受支持。
StorageClassList
StorageClassList 是 StorageClass 的集合。
apiVersion: storage.k8s.io/v1
kind: StorageClassList
metadata (ListMeta)
标准列表元数据。更多信息:https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
items ([]StorageClass),必需
items 是 StorageClass 列表
操作
get
读取指定的 StorageClass
HTTP 请求
GET /apis/storage.k8s.io/v1/storageclasses/{name}
参数
name (在路径中): string,必需
StorageClass 的名称
pretty (在查询参数中): string
响应
200 (StorageClass):OK
401:未经授权
list
列出或监听 StorageClass 类型的对象
HTTP 请求
GET /apis/storage.k8s.io/v1/storageclasses
参数
allowWatchBookmarks (在查询参数中): boolean
continue (在查询参数中): string
fieldSelector (在查询参数中): string
labelSelector (在查询参数中): string
limit (在查询参数中): integer
pretty (在查询参数中): string
resourceVersion (在查询参数中): string
resourceVersionMatch (在查询参数中): string
sendInitialEvents (在查询参数中): boolean
timeoutSeconds (在查询参数中): integer
watch (在查询参数中): boolean
响应
200 (StorageClassList):OK
401:未经授权
create
创建一个 StorageClass
HTTP 请求
POST /apis/storage.k8s.io/v1/storageclasses
参数
body: StorageClass,必需
dryRun (在查询参数中): string
fieldManager (在查询参数中): string
fieldValidation (在查询参数中): string
pretty (在查询参数中): string
响应
200 (StorageClass):OK
201 (StorageClass):Created
202 (StorageClass):Accepted
401:未经授权
update
替换指定的 StorageClass
HTTP 请求
PUT /apis/storage.k8s.io/v1/storageclasses/{name}
参数
name (在路径中): string,必需
StorageClass 的名称
body: StorageClass,必需
dryRun (在查询参数中): string
fieldManager (在查询参数中): string
fieldValidation (在查询参数中): string
pretty (在查询参数中): string
响应
200 (StorageClass):OK
201 (StorageClass):Created
401:未经授权
patch
部分更新指定的 StorageClass
HTTP 请求
PATCH /apis/storage.k8s.io/v1/storageclasses/{name}
参数
name (在路径中): string,必需
StorageClass 的名称
body: Patch,必需
dryRun (在查询参数中): string
fieldManager (在查询参数中): string
fieldValidation (在查询参数中): string
force (在查询参数中): boolean
pretty (在查询参数中): string
响应
200 (StorageClass):OK
201 (StorageClass):Created
401:未经授权
delete
删除一个 StorageClass
HTTP 请求
DELETE /apis/storage.k8s.io/v1/storageclasses/{name}
参数
name (在路径中): string,必需
StorageClass 的名称
body: DeleteOptions
dryRun (在查询参数中): string
gracePeriodSeconds (在查询参数中): integer
ignoreStoreReadErrorWithClusterBreakingPotential (在查询参数中): boolean
pretty (在查询参数中): string
propagationPolicy (在查询参数中): string
响应
200 (StorageClass):OK
202 (StorageClass):Accepted
401:未经授权
deletecollection
删除 StorageClass 集合
HTTP 请求
DELETE /apis/storage.k8s.io/v1/storageclasses
参数
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:未经授权
本页面是自动生成的。
如果您打算报告本页面的问题,请在您的问题描述中提及本页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。