Is there any method of setting default QoS for all of the nodes from given namespace? Or just set QoS on namespace level instead of pod level. I mean the situation where every existing and every newly created pod will have this default setting for given namespace.
Eg. All pods in namespace kube-system
or super-important
got QoS level "guaranted".
I want to set the QoS in such a way that in case of any problems with the resources pods from kube-system
(or other important groups/namespaces), they be removed last, later than the less important ones.
P.S. I got advice about admission-controllers but i didn't see correlation to QoS.
It's possible. Some basic information about QoS:
Here is an example of how to set the Guaranteed QoS for all pods in the namespace qos-test.
Let's create a namespace qos-test:
Next, let's create a LimitRange object YAML file (CPU and Memory should be present, limits and requests should be the same):
Then let’s apply it to the namespace qos-test:
Now, let's create a pod (CPU or Memory requests and limits must not be present in Pod spec):
Finally, let's check what we've got:
As you can see
default-pod
got theqosClass: Guaranteed
.To create pods with different QoS please refer to this part of documentation:
You can find more details about configuring default limits for a Namespace in this article: