May 2018
Intermediate to advanced
554 pages
13h 51m
English
The Guaranteed class has the highest priority of resource QoS classes. In the case of a resource shortage, the Kubernetes scheduler will try to retain the Guaranteed pod to the last.
In order to configure a pod to have the guaranteed class, explicitly set the resource limit and resource request as the same value, or only set the resource limit:
$ cat guaranteed.ymlapiVersion: v1kind: Podmetadata: name: guaranteed-podspec: containers: - name: nginx image: nginx resources: limits: cpu: 0.3 memory: 350Mi requests: cpu: 0.3 memory: 350Mi
$ kubectl create -f guaranteed.yml ...