-
Notifications
You must be signed in to change notification settings - Fork 118
/
priorityclass.yaml
33 lines (29 loc) · 1.37 KB
/
priorityclass.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#
# Author: Hari Sekhon
# Date: [% DATE # 2021-03-09 10:37:57 +0000 (Tue, 09 Mar 2021) %]
#
# vim:ts=2:sts=2:sw=2:et
# lint: k8s
#
# https://github.com/HariSekhon/Kubernetes-configs
#
# License: see accompanying Hari Sekhon LICENSE file
#
# If you're using my code you're welcome to connect with me on LinkedIn and optionally send me feedback to help steer this or other code I publish
#
# https://www.linkedin.com/in/HariSekhon
#
# ============================================================================ #
# P r i o r i t y C l a s s
# ============================================================================ #
# https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/
# https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/priority-class-v1/
---
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: high-priority
value: 1000000 # 1M out of 1B, higher is better
#preemptionPolicy: Never # set to prevent pods of this priorityClass from being preempted to make space for other pods
globalDefault: false # if true all pods get this value instead of the default 0. Only 1 priorityClass in a cluster can be default
description: "Use for critical workloads like Ingress controllers and Metal LB to ensure they get priority scheduling, especially when mixing stable and preemptible node pools"