user
What was the role of affinity and anti-affinity rules in John Mosquera's strategy for maintaining high availability in the Kubernetes clusters?
assistant
Affinity rules ensured that related pods were placed on the same node or zone, improving performance. Anti-affinity rules prevented pods from critical services being placed on the same node, improving availability. Affinity and anti-affinity rules improved performance and availability by controlling pod placement.