Watch Aspire live streamsDocsTry Aspire

PodAffinityV1

Classsealednet10.0
📦 Aspire.Hosting.Kubernetes v13.6.0-preview.1.26478.8
Represents pod affinity rules for Kubernetes pod scheduling. This class defines the pod affinity and anti-affinity constraints that influence the placement of pods during scheduling.
namespace Aspire.Hosting.Kubernetes.Resources;
public sealed class PodAffinityV1
{
// ...
}
Pod affinity is used to dictate that certain pods should be scheduled either in the same topology (e.g., node or zone) as other specified pods or avoid the same topology. It supports both soft preferences and hard requirements for pod placement.
View all constructors
View all properties