0

is there a way to force a sts pod on kubernetes to move to another node on kubernetes cluster?

by default kubernetes put all on the same node since I have local pv but I want the replica will be distributed.

before I added pv local storage as below the nodes were distributed equally around kubernetes nodes. after I add pv I can see them only on one node, is there a way to spread them across nodes?

this is my pvc :

  name: local-volume
spec:
  storageClassName: local-st
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi

~

NoamiA
  • 521
  • 4
  • 19
  • The answers to [distributing deployments here](https://stackoverflow.com/questions/39092090/how-can-i-distribute-a-deployment-across-nodes) mostly apply to statefulsets too. Especially the link to [pod topology constraints](https://kubernetes.io/docs/concepts/workloads/pods/pod-topology-spread-constraints). – char Feb 22 '21 at 11:34
  • Can you provide a [mcve] describing your setup a little more? Is this in the context of a StatefulSet? What sort of volume provisioner are you using? – David Maze Feb 22 '21 at 12:13
  • I added pvc detailed Im using a sts cluster I can suplly also the sts.yaml if it will be useful – NoamiA Feb 22 '21 at 12:44
  • This is not minimal reproducible example. Can you actaully provide a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example)? – Matt Feb 23 '21 at 12:04

0 Answers0