Spreading jupyter-XXXX pods in the cluster

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!

Did you change any related configuration settings?
For instance, we only maintain a static amount of nodes, so we disabled the user scheduler and user placeholder.

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

1 Like

I believe this is what pod anti-affinity is for. So I believe this config would spread user pods out across nodes:

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

But just disabling the user scheduler might be enough:

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.