kubernetes优先级PriorityClasses

  运维
[root@db02 test]# kubectl get PriorityClasses
NAME                      VALUE        GLOBAL-DEFAULT   AGE
addon-priority            999999       false            16d
high-priority             1000000      false            16d
system-cluster-critical   2000000000   false            16d
system-node-critical      2000001000   false            16d

创建示例:

apiVersion: scheduling.k8s.io/v1alpha1
kind: PriorityClass
metadata:
  name: high-priority
#value小于一亿的32bit整数,数字越大优先级越高,超过一亿的数字被系统保留,用于指派给系统组件。
value: 1000000
#globalDefault:指示是否应用于全局pod
globalDefault: false
description: "This priority class should be used for test service pods only."

使用:

apiVersion: componentconfig/v1alpha1
kind: KubeSchedulerConfiguration
algorithmSource:
  provider: DefaultProvider

...

disablePreemption: true
  PriorityClass

One Reply to “kubernetes优先级PriorityClasses”

LEAVE A COMMENT

Captcha Code