<p>I have a bunch of pods running in the same cluster. Sometimes there are not enough resources and some pods need to terminate. </p>

<p>That's OK, but how do I set the priority of which pods are killed first?</p>

<p>It usually kills my most important service first :\</p>

<p>Thanks!</p>

<p>I suggest you take a look at <a href="https://github.com/kubernetes/community/blob/master/contributors/design-proposals/resource-qos.md" rel="nofollow noreferrer">resource QoS</a>.</p>

<p>Have you important stuff (including monitoring) specify limit=request which in turn will land them in the guaranteed QoS class.</p>

<p>Specifically,</p>

<blockquote>
  <p>The system computes pod level requests and limits by summing up per-resource requests and limits across all containers. When request == limit, the resources are guaranteed (...)</p>
</blockquote>

<p>Also, overstepping CPU limits only results in throttling, so it's more important to get memory limits (per container) right.</p>
