Skip to content
Docs Try Aspire

PodAntiAffinityV1 Properties

Class Properties 2 members
Represents the pod anti-affinity rules used in Kubernetes scheduling policies.
A list of weighted pod affinity terms that are considered during scheduling. This property allows specifying optional pod anti-affinity preferences for scheduling decisions, while permitting the system to schedule pods in scenarios where the preferences cannot be met. Each term is associated with a weight that indicates its relative importance.
public List<WeightedPodAffinityTermV1> PreferredDuringSchedulingIgnoredDuringExecution { get; }
The items in the list define preferences rather than strict requirements. The Kubernetes scheduler tries to place pods in a manner that satisfies the specified preferences, considering their weights, but it may also fall back to alternate scheduling strategies if the preferences cannot be accommodated. This property is primarily used to influence pod placement while maintaining scheduling flexibility.
Represents a list of PodAffinityTermV1 objects used to define required pod anti-affinity constraints that must be met during pod scheduling but are ignored during execution. This property ensures that certain pod placement rules are enforced when scheduling occurs; however, these rules can be relaxed if the constraints are violated at runtime, such as when a node becomes unavailable or pods are rescheduled for fault recovery.
public List<PodAffinityTermV1> RequiredDuringSchedulingIgnoredDuringExecution { get; }