The placement preference that takes down a stateless core

Setting whenUnsatisfiable to ScheduleAnyway lets a Kubernetes scheduler place redundant core functions in the same availability zone even when that placement violates the intended spread. The manifest passes validation, the replicas become ready, and a zone outage removes the redundancy that code review appeared to approve. Stateless application processes do not change that outcome.

A valid configuration with the wrong guarantee

The mistake survives review because topologySpreadConstraints looks like an availability control even when its configured behavior is only a scheduling preference. With topologyKey set to topology.kubernetes.io/zone, ScheduleAnyway favors placements that reduce imbalance but permits placements outside the requested spread, as the Kubernetes scheduling documentation explains. A maxSkew of one pod therefore expresses a balancing target under this policy, rather than a hard placement limit. Reviewers see separate replicas and a zone constraint, while deployment checks see ready containers, so neither necessarily establishes that useful capacity survives the loss of a zone. In a 3GPP service-based core, that distinction matters because surviving session management requires reachable service instances and usable session context, not merely a desired replica count.

Readiness does not prove independence

A stateless session management process only contributes to zone resilience when its replacement can reach authoritative context, resume the required control interactions, and receive traffic without depending on the zone that disappeared.

Inspect the placement you actually have

Today, with the intended cluster context and workload namespace selected, run `kubectl describe pods` and `kubectl describe nodes`, both read-only commands. For the session management workload, match each pod's Node field to the node's topology.kubernetes.io/zone label, then inspect the pod's Topology Spread Constraints field for ScheduleAnyway and confirm that its selector matches the replicas you are counting. Record ready replicas by zone and remove each zone from that inventory in turn: a row with no surviving replica exposes the immediate concentration risk, while missing topology labels make the inventory insufficient to establish resilience. Next, trace the survivors' access to session storage and service routing, because a pod in another zone cannot continue work through a dependency that existed only in the lost zone. Turn this inspection into a deployment gate using live placement and rendered configuration, then validate the remaining uncertainty in an isolated environment by making the selected zone unavailable while exercising session establishment and modification, rather than relying on container readiness alone.

Make the guarantee worth enforcing

Use this decision rule: accept a deployment as zone resilient only when removing any supported failure zone leaves enough reachable, state-capable service capacity to carry the required workload. Where scheduling must enforce the distribution, choose DoNotSchedule, verify that affinity and node eligibility permit the intended zones, and configure minDomains to reflect the required domain count, since a skew limit alone does not guarantee geographic diversity. Hard constraints can leave replacement pods pending during reduced capacity, so reserve capacity in the surviving zones and test the degraded operating condition before enforcing the policy in production. Separate clouds also require separate evidence: a scheduler's topology constraint applies within its cluster and cannot establish remote traffic failover or session ownership across clusters. The remaining operational decision is whether to reject a deployment that cannot meet the availability contract or explicitly operate it with reduced protection, with that choice visible before the next zone disappears.

Back to FiveGCore · Domains

← Back to FiveGCore
Engineering & Architecture Brief

The placement preference that takes down a stateless core

Setting whenUnsatisfiable to ScheduleAnyway lets a Kubernetes scheduler place redundant core functions in the same availability zone even when that placement violates the intended spread. The manifest passes validation, the replicas become ready, and a zone outage removes the redundancy that code review appeared to approve. Stateless application processes do not change that outcome.

A valid configuration with the wrong guarantee

The mistake survives review because topologySpreadConstraints looks like an availability control even when its configured behavior is only a scheduling preference. With topologyKey set to topology.kubernetes.io/zone, ScheduleAnyway favors placements that reduce imbalance but permits placements outside the requested spread, as the Kubernetes scheduling documentation explains. A maxSkew of one pod therefore expresses a balancing target under this policy, rather than a hard placement limit. Reviewers see separate replicas and a zone constraint, while deployment checks see ready containers, so neither necessarily establishes that useful capacity survives the loss of a zone. In a 3GPP service-based core, that distinction matters because surviving session management requires reachable service instances and usable session context, not merely a desired replica count.

Readiness does not prove independence

A stateless session management process only contributes to zone resilience when its replacement can reach authoritative context, resume the required control interactions, and receive traffic without depending on the zone that disappeared.

Inspect the placement you actually have

Today, with the intended cluster context and workload namespace selected, run `kubectl describe pods` and `kubectl describe nodes`, both read-only commands. For the session management workload, match each pod's Node field to the node's topology.kubernetes.io/zone label, then inspect the pod's Topology Spread Constraints field for ScheduleAnyway and confirm that its selector matches the replicas you are counting. Record ready replicas by zone and remove each zone from that inventory in turn: a row with no surviving replica exposes the immediate concentration risk, while missing topology labels make the inventory insufficient to establish resilience. Next, trace the survivors' access to session storage and service routing, because a pod in another zone cannot continue work through a dependency that existed only in the lost zone. Turn this inspection into a deployment gate using live placement and rendered configuration, then validate the remaining uncertainty in an isolated environment by making the selected zone unavailable while exercising session establishment and modification, rather than relying on container readiness alone.

Make the guarantee worth enforcing

Use this decision rule: accept a deployment as zone resilient only when removing any supported failure zone leaves enough reachable, state-capable service capacity to carry the required workload. Where scheduling must enforce the distribution, choose DoNotSchedule, verify that affinity and node eligibility permit the intended zones, and configure minDomains to reflect the required domain count, since a skew limit alone does not guarantee geographic diversity. Hard constraints can leave replacement pods pending during reduced capacity, so reserve capacity in the surviving zones and test the degraded operating condition before enforcing the policy in production. Separate clouds also require separate evidence: a scheduler's topology constraint applies within its cluster and cannot establish remote traffic failover or session ownership across clusters. The remaining operational decision is whether to reject a deployment that cannot meet the availability contract or explicitly operate it with reduced protection, with that choice visible before the next zone disappears.

Related Architecture Specifications (5G): 5gboard.com · 5gspine.com · telemetrymesh.com

More Technical Articles on fivegcore.com

Benchmarking UDSF Session State Synchronization Latency in Active-Active 5G Cores →Zero-Downtime Canary Upgrades of 5G AMF Microservices in Live Networks →