Workload v1alpha1
apiVersion: scheduling.k8s.io/v1alpha1
import "k8s.io/api/scheduling/v1alpha1"
Workload
Workload 允许表达在管理 Workload 生命周期时应使用的调度约束,包括调度、抢占、驱逐和其他阶段。
apiVersion: scheduling.k8s.io/v1alpha1
kind: Workload
metadata (ObjectMeta)
标准对象的元数据。名称必须是 DNS 子域名。
spec (WorkloadSpec), required
Spec 定义 Workload 的期望行为。
WorkloadSpec
WorkloadSpec 定义 Workload 的期望状态。
podGroups ([]PodGroup), required
映射:在合并期间将保留 key name 上的唯一值
PodGroups 是构成 Workload 的 Pod 组列表。Pod 组的最大数量为 8。此字段是不可变的。
podGroups.name (string), required
Name 是 Workload 中 PodGroup 的唯一标识符。它必须是 DNS 标签。此字段是不可变的。
podGroups.policy (PodGroupPolicy), required
Policy 定义此 PodGroup 的调度策略。
controllerRef (TypedLocalObjectReference)
ControllerRef 是对控制对象的可选引用,例如 Deployment 或 Job。此字段旨在由 CLI 等工具使用,以提供返回到原始 Workload 定义的链接。设置后,无法更改它。
TypedLocalObjectReference 允许引用同一命名空间内的类型化对象。
controllerRef.kind (string), required
Kind 是正在引用的资源的类型。它必须是路径段名称。
controllerRef.name (string), required
Name 是正在引用的资源的名称。它必须是路径段名称。
controllerRef.apiGroup (string)
APIGroup 是正在引用资源的组。如果 APIGroup 为空,则指定的 Kind 必须在核心 API 组中。对于任何其他第三方类型,设置 APIGroup 是必需的。它必须是 DNS 子域名。
WorkloadList
WorkloadList 包含 Workload 资源的列表。
apiVersion: scheduling.k8s.io/v1alpha1
kind: WorkloadList
metadata (ListMeta)
标准列表元数据。
items ([]Workload), required
Items 是 Workload 列表。
操作
get 读取指定的 Workload
HTTP 请求
GET /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name}
Parameters
响应
200 (Workload): OK
401: 未授权
list 列出或监视 Workload 类型的对象
HTTP 请求
GET /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads
Parameters
namespace (在路径中): string, 必需
allowWatchBookmarks (in query): boolean
continue (in query): string
fieldSelector (in query): string
labelSelector (in query): string
limit (in query): integer
pretty (在查询中): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
watch (in query): boolean
响应
200 (WorkloadList): OK
401: 未授权
list 列出或监视 Workload 类型的对象
HTTP 请求
GET /apis/scheduling.k8s.io/v1alpha1/workloads
Parameters
allowWatchBookmarks (in query): boolean
continue (in query): string
fieldSelector (in query): string
labelSelector (in query): string
limit (in query): integer
pretty (在查询中): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
watch (in query): boolean
响应
200 (WorkloadList): OK
401: 未授权
create 创建 Workload
HTTP 请求
POST /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads
Parameters
namespace (在路径中): string, 必需
body: Workload, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (Workload): OK
201 (Workload): Created
202 (Workload): Accepted
401: 未授权
update 替换指定的 Workload
HTTP 请求
PUT /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name}
Parameters
name (在路径中): string, 必需
Workload 的名称
namespace (在路径中): string, 必需
body: Workload, required
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
pretty (在查询中): string
响应
200 (Workload): OK
201 (Workload): Created
401: 未授权
patch 部分更新指定的 Workload
HTTP 请求
PATCH /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name}
Parameters
name (在路径中): string, 必需
Workload 的名称
namespace (在路径中): string, 必需
body: Patch, 必需
dryRun (在查询中): string
fieldManager (在查询中): string
fieldValidation (在查询中): string
force (in query): boolean
pretty (在查询中): string
响应
200 (Workload): OK
201 (Workload): Created
401: 未授权
delete 删除 Workload
HTTP 请求
DELETE /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads/{name}
Parameters
name (在路径中): string, 必需
Workload 的名称
namespace (在路径中): string, 必需
body: DeleteOptions
dryRun (在查询中): string
gracePeriodSeconds (in query): integer
ignoreStoreReadErrorWithClusterBreakingPotential (in query): boolean
pretty (在查询中): string
propagationPolicy (in query): string
响应
200 (Status): 确定
202 (Status): 已接受
401: 未授权
deletecollection 删除 Workload 集合
HTTP 请求
DELETE /apis/scheduling.k8s.io/v1alpha1/namespaces/{namespace}/workloads
Parameters
namespace (在路径中): string, 必需
body: DeleteOptions
continue (in query): string
dryRun (在查询中): string
fieldSelector (in query): string
gracePeriodSeconds (in query): integer
ignoreStoreReadErrorWithClusterBreakingPotential (in query): boolean
labelSelector (in query): string
limit (in query): integer
pretty (在查询中): string
propagationPolicy (in query): string
resourceVersion (in query): string
resourceVersionMatch (in query): string
sendInitialEvents (in query): boolean
timeoutSeconds (in query): integer
响应
200 (Status): 确定
401: 未授权
本页面是自动生成的。
如果您打算报告此页面的问题,请在您的问题描述中提及该页面是自动生成的。修复可能需要在 Kubernetes 项目的其他地方进行。