Skip to content

Instantly share code, notes, and snippets.

@ssbostan
Created April 17, 2023 14:24
Show Gist options
  • Save ssbostan/9d1f9ba81369106e892d1e0390a6523d to your computer and use it in GitHub Desktop.
Save ssbostan/9d1f9ba81369106e892d1e0390a6523d to your computer and use it in GitHub Desktop.
Kubernetes Hacks and Tricks - #8 Pod Preemption, Eviction and Priority classes
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: default-pc
labels:
app.kubernetes.io/created-by: ssbostan
description: Priority class to run all pods without priority class name
globalDefault: true
preemptionPolicy: Never
value: 10000
---
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: dev-pc
labels:
app.kubernetes.io/created-by: ssbostan
description: Priority class to run all dev pods
globalDefault: false
preemptionPolicy: PreemptLowerPriority
value: 20000
---
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: prod-pc
labels:
app.kubernetes.io/created-by: ssbostan
description: Priority class to run all prod pods
globalDefault: false
preemptionPolicy: PreemptLowerPriority
value: 30000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment