Skip to main content
Version: v1.5

Spread Scheduling

Spread scheduling allows a Kubernetes resource to be created once in the Nova control plane and placed to multiple workload clusters.

This is useful when the same resource should exist in more than one workload cluster, or when replicas should be distributed across workload clusters.

Spread Modes

Spread scheduling supports two modes:

  • Duplicate – each selected workload cluster receives the full object
  • Divide – replicas are divided across selected workload clusters

Duplicate Mode

In duplicate mode, Nova applies the resource to each selected workload cluster.

For example, if a Deployment has 10 replicas and is duplicated across three workload clusters, each workload cluster receives a Deployment with 10 replicas.

Divide Mode

In divide mode, Nova divides replicas across selected workload clusters.

For example, a Deployment with 10 replicas could be divided as:

  • workload cluster A: 3 replicas
  • workload cluster B: 3 replicas
  • workload cluster C: 4 replicas

Example: Duplicate Mode

apiVersion: policy.elotl.co/v1alpha1
kind: SchedulePolicy
metadata:
name: duplicate-policy
spec:
resourceSelectors:
labelSelectors:
- matchLabels:
app: shared-service
clusterSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: In
values:
- wlc-1
- wlc-2
spreadConstraints:
spreadMode: Duplicate

Example: Divide Mode

apiVersion: policy.elotl.co/v1alpha1
kind: SchedulePolicy
metadata:
name: divide-policy
spec:
resourceSelectors:
labelSelectors:
- matchLabels:
app: web
clusterSelector:
matchExpressions:
- key: kubernetes.io/metadata.name
operator: In
values:
- wlc-1
- wlc-2
- wlc-3
spreadConstraints:
spreadMode: Divide
percentageSplit:
wlc-1: 30
wlc-2: 30
wlc-3: 40

Cluster-specific Overrides

Spread scheduling can also apply per-workload-cluster overrides.

This is useful when a resource is mostly the same across workload clusters but requires small differences, such as a cluster-specific label, annotation, or configuration value.

Example use cases include:

  • adding service mesh labels to namespaces
  • applying workload-cluster-specific annotations
  • adjusting values for regional or provider-specific differences

Example Output

A resource managed by spread scheduling may include the Nova spread annotation:

metadata:
annotations:
nova.elotl.co/spread-onto: "wlc-1,wlc-2::Duplicate"

For divide mode, the annotation may show the split across workload clusters:

metadata:
annotations:
nova.elotl.co/spread-onto: "wlc-1=30%,wlc-2=30%,wlc-3=40%::Divide"