# Spreading jupyter-XXXX pods in the cluster

**URL:** <https://discourse.jupyter.org/t/spreading-jupyter-xxxx-pods-in-the-cluster/37949>\
**Category:** Zero to JupyterHub on Kubernetes\
**Created:** [September 25, 2025, 8:39am UTC](https://discourse.jupyter.org/t/spreading-jupyter-xxxx-pods-in-the-cluster/37949 "2025-09-25T08:39:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdmnf](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/rdmnf/32/18935_2.png) [@rdmnf](https://discourse.jupyter.org/u/rdmnf)\
**Post date:** [September 25, 2025, 8:39am UTC](https://discourse.jupyter.org/t/spreading-jupyter-xxxx-pods-in-the-cluster/37949/1 "2025-09-25T08:39:08Z")

</div>

Hi all, I deployed JH in K8s cluster.  
I’m looking for a way to spread the pods of new users in different nodes of the cluster, rather that in the same node as the previous pod.

Thanks!

---

<div class="post-metadata">

**Author:** ![Paul2708](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/paul2708/32/14207_2.png) [@Paul2708](https://discourse.jupyter.org/u/Paul2708)\
**Post date:** [September 25, 2025, 12:09pm UTC](https://discourse.jupyter.org/t/spreading-jupyter-xxxx-pods-in-the-cluster/37949/2 "2025-09-25T12:09:52Z")

</div>

Did you change any related configuration settings?  
For instance, we only maintain a static amount of nodes, so we disabled the [user scheduler](https://z2jh.jupyter.org/en/stable/resources/reference.html#scheduling-userscheduler) and [user placeholder](https://z2jh.jupyter.org/en/stable/resources/reference.html#scheduling-userplaceholder-enabled).

Maybe you can share your node setup and the Helm chart configuration?

---

<div class="post-metadata">

**Author:** ![minrk](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/minrk/32/13_2.png) [@minrk](https://discourse.jupyter.org/u/minrk)\
**Post date:** [October 6, 2025, 6:08pm UTC](https://discourse.jupyter.org/t/spreading-jupyter-xxxx-pods-in-the-cluster/37949/3 "2025-10-06T18:08:02Z")

</div>

I believe this is what [pod anti-affinity](https://z2jh.jupyter.org/en/stable/resources/reference.html#singleuser-extrapodantiaffinity) is for. So I believe this config would spread user pods out across nodes:

```yaml
    scheduling:
      userScheduler:
        enabled: false
    singleuser:
      extraPodAntiAffinity:
        preferred:
          - podAffinityTerm:
              labelSelector:
                matchLabels:
                  component: singleuser-server
            weight: 10

```

But just disabling the user scheduler might be enough:

```yaml
scheduling:
  userScheduler:
    enabled: false

```

The user scheduler packs user pods next to each other to maximize the effectiveness of scale-down in autoscaling clusters. If you don’t have an autoscaling cluster, then it can be disabled without any expected negative impacts, I think.

---

<div class="post-metadata">

**Author:** ![rdmnf](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/rdmnf/32/18935_2.png) [@rdmnf](https://discourse.jupyter.org/u/rdmnf)\
**Post date:** [January 5, 2026, 12:52pm UTC](https://discourse.jupyter.org/t/spreading-jupyter-xxxx-pods-in-the-cluster/37949/4 "2026-01-05T12:52:57Z")

</div>

thank you!  
when just configure it with disabling `userScheduler` ; the configuration can run the pods; however, but when I configure `singleuser.extraPodAntiAffinity` as you mentioned, I get the `500 : Internal Server Error` and spawning the pod fails.

with the current configuration (disabling userScheduler) the pods are spread around the cluster with only three test users for now. I’ll be monitoring it with more users soon.
