<p>I have single node kubenertes cluster running on GKE. All the load is running on single node separated by namesapces.</p>

<p>now i would like to implement the auto-scaling. Is it possible i can scale mircoservices to new node but one pod is running My main node only.</p>

<p>what i am thinking </p>

<p>Main node : Running everything with 1 pod avaibility (Redis, Elasticsearch)</p>

<p>Scaled up node : Scaled up replicas only of stateless microservice</p>

<p>so is there any way i can implemet this using <code>node auto scaeler</code> or using <code>affinity</code>.</p>

<p>Issue is that right now i am running graylog, elasticsearch and redis and rabbitmq on single node having <code>statefulsets</code> and backed by volume i have to redeploy everything edit yaml file for adding <code>affinity</code> to all.</p>

Harsh Manvar
<p>Assuming the issue you have is that the persistent volumes bound to your StatefulSets are only accessible from one node, then you can use the <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#node-affinity" rel="nofollow noreferrer">nodeAffinity</a> field to constraint where the StatefulSet Pods can be scheduled. As mentioned in the documentation:</p>

<blockquote>
  <p>A PV can specify node affinity to define constraints that limit what
  nodes this volume can be accessed from. Pods that use a PV will only
  be scheduled to nodes that are selected by the node affinity.</p>
</blockquote>
