<p>we are planning to introduce AWS spot instances in production ( non-prod is running with spot already ). In order to achieve HA we are running HPA with minimum replicas 2 for all critical deployments. Because of the spot instances behaviour we want to run on-demand instances and one pod should be running on on-demand instances for the same</p>
<p><strong>Question:</strong></p>
<p>Is there anyway i can split pods to get launch one pod of the deployment in on-demand and all the other pods (another one since minimum is 2 and if HPA increase the pods ) of the same deployment in spot instances.</p>
<p>We already using nodeaAffinity and podAntiAffinity since we have multiple node groups for different reasons. Below is the snippet.</p>
<pre><code>        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: category
                operator: In
                values:
                - &lt;some value&gt;
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
          - labelSelector:
              matchExpressions:
              - key: &lt;lable key&gt;
                operator: In
                values: 
                - &lt;lable value&gt;
            topologyKey: &quot;kubernetes.io/hostname&quot;
    
</code></pre>

Anil Kumar
<p>Following up on your last message:</p>
<blockquote>
<p>Will check the two deployments with same label in non-prod then we will update here.</p>
</blockquote>
<p>Just wondering how this went. Was there any issues/gotchas from this setup that you could share. Are you currently using this setup, or have you moved on to another setup.</p>
