title: Kubernetes scale down particular pod
body: <p>I have a Kubernetes deployment which can have multiple replica pods. I wish to horizontally increase and decrease the pods based on some logic in my python application (not custom metrics in hpa).</p>
  <p>I have two ways to this:</p>
  <ol>
  <li>Using Horizontal Pod Autoscalar and changing minReplicas, maxReplicas though my application by using kubernetes APIs</li>
  <li>Directly updating the &quot;/spec/replicas&quot; field in my deployment using the APIs</li>
  </ol>
  <p>Both the above things are working for upscale and downscale.</p>
  <p>But, when I scale down, I want to remove a particular Pod, and not any other pod.</p>
  <p>If I update the minReplicas maxReplicas in HPA, then it randomly deletes a pod.
  Same when I update the /spec/replicas field in the deployment.</p>
  <p>How can I delete a particular pod while scaling down?</p>