<p><strong>Situation</strong></p>

<p>When a deployment fails on our OpenShift 3.11 instance because of a <code>Failed Scheduling</code> error event, a message comparable to the following shown:</p>

<blockquote>
  <p>Failed Scheduling 0/11 nodes are available: 10 CheckServiceAffinity, 2 ExistingPodsAntiAffinityRulesNotMatch, 2 MatchInterPodAffinity, 5 MatchNodeSelector.</p>
</blockquote>

<p>In the above error message, the term <code>CheckServiceAffinity</code> is used. While it's easy to find articles on Pod Affinity or Anti-Affinity, I couldn't find a detailed description of Service Affinity.</p>

<p><strong>Question</strong></p>

<ol>
<li>What is Service Affinity?</li>
<li>Is it a concept of Kubernetes or is it exclusive to OpenShift?</li>
</ol>

dajood
<ol>
<li><p>ServiceAffinity places pods on nodes based on the service running on that pod. Placing pods of the same service on the same or co-located nodes can lead to higher efficiency.</p></li>
<li><p>It's a concept of openshift and not of open source kubernetes.</p></li>
</ol>

<p><a href="https://docs.openshift.com/container-platform/3.9/admin_guide/scheduling/scheduler.html#configurable-predicates" rel="nofollow noreferrer">https://docs.openshift.com/container-platform/3.9/admin_guide/scheduling/scheduler.html#configurable-predicates</a></p>
