DevOps in K8s — Pod Scheduling

<p>Typically, when deploying Pods, the cluster&rsquo;s auto-scheduling policy determines their node placement. While this default scheduler looks to distribute loads evenly with ample resources, there are instances where we need more precise control.</p> <p>For example, we might want to ensure machine learning applications only run on GPU-equipped nodes. If our services are communication-intensive, it&rsquo;s ideal for their Pods to reside on a single node. To achieve this controlled scheduling, we leverage two key concepts:&nbsp;<strong>affinity</strong>&nbsp;and&nbsp;<strong>anti-affinity</strong>. Affinity itself is categorized into node affinity (nodeAffinity) and pod affinity (podAffinity).</p> <h1>NodeSelector Introduction</h1> <p><code>nodeSelector</code>&nbsp;is a simple and straightforward way to constrain pods to nodes with specific labels. It allows you to ensure that a pod only runs on a node with specific label(s).</p> <p><a href="https://tonylixu.medium.com/devops-in-k8s-pod-scheduling-fbb5dd53350d"><strong>Read More</strong></a></p>
Tags: Pod scheduling