topologySpreadConstraints is not distributing pods across Availability Zones in OpenShift Container Platform 4

Solution Verified - Updated -

Issue

  • Trying the topologySpreadConstraints feature and it is not behaving as I expect. After creating the pods all are placed in the same node, instead of spread on different nodes in different Availability Zones.
  • Pods are not spread across Availability Zones when using topologySpreadConstraints with topology.kubernetes.io/zone.

Environment

  • Red Hat OpenShift Container Platform (OCP) 4.1 until 4.8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content