Power of PriorityClass in Kubernetes

minikube start --memory 1800 --cpus 2
apiVersion: scheduling.k8s.io/v1
kind: PriorityClass
metadata:
name: high-priority
namespace: default
value: 1000000
globalDefault: false
description: "Used for High Priority Pods"
apiVersion: v1
kind: Pod
metadata:
name: no-priority-pod
namespace: default
spec:
containers:
- name: app
image: nginx
resources:
requests:
cpu: 500m
memory: 500Mi
limits:
cpu: 500m
memory: 500Mi
kind: Pod
metadata:
name: high-priority-pod-1
namespace: default
spec:
containers:
- name: app
image: nginx
resources:
requests:
cpu: 500m
memory: 500Mi
limits:
cpu: 500m
memory: 500Mi
priorityClassName: high-priority
apiVersion: v1
kind: Pod
metadata:
name: high-priority-pod-2
namespace: default
spec:
containers:
- name: app
image: nginx
resources:
requests:
cpu: 500m
memory: 500Mi
limits:
cpu: 500m
memory: 500Mi
priorityClassName: high-priority

Summary:

“no pod is born equal :( “

“If you found this article useful, feel free to 👏 clap many times or share it with your friends. If you have any doubts regarding the same or anything around the DevOps Space, get in touch with me on Linkedin, Twitter, Instagram.”

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store