23 KiB
api_metadata | content_type | description | title | weight | auto_generated | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
api_reference | PriorityClass 定义了从优先级类名到优先级数值的映射。 | PriorityClass | 13 | false |
apiVersion: scheduling.k8s.io/v1
import "k8s.io/api/scheduling/v1"
PriorityClass
PriorityClass 定义了从优先级类名到优先级数值的映射。 该值可以是任何有效的整数。
- apiVersion: scheduling.k8s.io/v1
- kind: PriorityClass
-
metadata (<a href="{{< ref "../common-definitions/object-meta#ObjectMeta" >}}">ObjectMeta)
标准对象的元数据。 更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-
value (int32),必需
value 表示此优先级的整数值。这是 Pod 在其 Pod 规约中有此类名称时收到的实际优先级。
-
description (string)
description 是一个任意字符串,通常提供有关何时应使用此优先级的指南。
-
globalDefault (boolean)
globalDefault 指定是否应将此 PriorityClass 视为没有任何优先级类的 Pod 的默认优先级。 只有一个 PriorityClass 可以标记为
globalDefault
。 但是,如果存在多个 PriorityClasses 且其globalDefault
字段设置为 true, 则将使用此类全局默认 PriorityClasses 的最小值作为默认优先级。
-
preemptionPolicy (string)
PreemptionPolicy 是抢占优先级较低的 Pod 的策略。 可选值:Never、PreemptLowerPriority。 如果未设置,则默认为 PreemptLowerPriority。
PriorityClassList
PriorityClassList 是优先级类的集合。
- apiVersion: scheduling.k8s.io/v1
- kind: PriorityClassList
-
metadata (<a href="{{< ref "../common-definitions/list-meta#ListMeta" >}}">ListMeta)
标准列表元数据。更多信息: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata
-
items ([]<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass),必需
items 是 PriorityClasses 的列表
操作
get
读取特定的 PriorityClass
HTTP 请求
GET /apis/scheduling.k8s.io/v1/priorityclasses/{name}
参数
-
name (路径参数): string,必需
PriorityClass 名称
-
pretty (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty
响应
200 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): OK
401: Unauthorized
list
列出或观察 PriorityClass类的对象
HTTP 请求
GET /apis/scheduling.k8s.io/v1/priorityclasses
参数
-
allowWatchBookmarks (查询参数):boolean
<a href="{{< ref "../common-parameters/common-parameters#allowWatchBookmarks" >}}">allowWatchBookmarks
-
continue (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue
-
fieldSelector (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector
-
labelSelector (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector
-
limit (查询参数):integer
<a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit
-
pretty (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty
-
resourceVersion (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion
-
resourceVersionMatch (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch
-
sendInitialEvents (查询参数): boolean
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents
-
timeoutSeconds (查询参数):integer
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds
-
watch (查询参数):boolean
<a href="{{< ref "../common-parameters/common-parameters#watch" >}}">watch
响应
200 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClassList" >}}">PriorityClassList): OK
401: Unauthorized
create
创建一个 PriorityClass
HTTP 请求
POST /apis/scheduling.k8s.io/v1/priorityclasses
参数
- body: <a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass,必需
-
dryRun (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun
-
fieldManager (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager
-
fieldValidation (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation
-
pretty (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty
响应
200 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): OK
201 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): Created
202 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): Accepted
401: Unauthorized
update
替换指定的 PriorityClass
HTTP 请求
PUT /apis/scheduling.k8s.io/v1/priorityclasses/{name}
参数
-
name (路径参数): string,必需
PriorityClass 名称
- body: <a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass,必需
-
dryRun (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun
-
fieldManager (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager
-
fieldValidation (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation
-
pretty (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty
响应
200 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): OK
201 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): Created
401: Unauthorized
patch
部分更新特定的 PriorityClass
HTTP 请求
PATCH /apis/scheduling.k8s.io/v1/priorityclasses/{name}
参数
-
name (路径参数): string,必需
PriorityClass 名称
- body: <a href="{{< ref "../common-definitions/patch#Patch" >}}">Patch,必需
-
dryRun (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun
-
fieldManager (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#fieldManager" >}}">fieldManager
-
fieldValidation (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#fieldValidation" >}}">fieldValidation
-
force (查询参数):boolean
<a href="{{< ref "../common-parameters/common-parameters#force" >}}">force
-
pretty (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty
响应
200 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): OK
201 (<a href="{{< ref "../workload-resources/priority-class-v1#PriorityClass" >}}">PriorityClass): Created
401: Unauthorized
delete
删除一个 PriorityClass
HTTP 请求
DELETE /apis/scheduling.k8s.io/v1/priorityclasses/{name}
参数
-
name (路径参数): string,必需
PriorityClass 名称。
- body: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions
-
dryRun (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun
-
gracePeriodSeconds (查询参数):integer
<a href="{{< ref "../common-parameters/common-parameters#gracePeriodSeconds" >}}">gracePeriodSeconds
-
pretty (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty
-
propagationPolicy (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#propagationPolicy" >}}">propagationPolicy
响应
200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status): OK
202 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status): Accepted
401: Unauthorized
deletecollection
删除 PriorityClass 集合
HTTP 请求
DELETE /apis/scheduling.k8s.io/v1/priorityclasses
参数
- body: <a href="{{< ref "../common-definitions/delete-options#DeleteOptions" >}}">DeleteOptions
-
continue (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#continue" >}}">continue
-
dryRun (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#dryRun" >}}">dryRun
-
fieldSelector (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#fieldSelector" >}}">fieldSelector
-
gracePeriodSeconds (查询参数):integer
<a href="{{< ref "../common-parameters/common-parameters#gracePeriodSeconds" >}}">gracePeriodSeconds
-
labelSelector (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#labelSelector" >}}">labelSelector
-
limit (查询参数):integer
<a href="{{< ref "../common-parameters/common-parameters#limit" >}}">limit
-
pretty (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#pretty" >}}">pretty
-
propagationPolicy (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#propagationPolicy" >}}">propagationPolicy
-
resourceVersion (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#resourceVersion" >}}">resourceVersion
-
resourceVersionMatch (查询参数):string
<a href="{{< ref "../common-parameters/common-parameters#resourceVersionMatch" >}}">resourceVersionMatch
-
sendInitialEvents (查询参数): boolean
<a href="{{< ref "../common-parameters/common-parameters#sendInitialEvents" >}}">sendInitialEvents
-
timeoutSeconds (查询参数):integer
<a href="{{< ref "../common-parameters/common-parameters#timeoutSeconds" >}}">timeoutSeconds
响应
200 (<a href="{{< ref "../common-definitions/status#Status" >}}">Status): OK
401: Unauthorized