Skip to content
Docs Try Aspire

PodAffinityV1 Properties

Class Properties 2 members
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.
Represents an optional list of weighted pod affinity terms that are considered during the scheduling phase of a pod's lifecycle, but ignored during the execution phase.
public List<WeightedPodAffinityTermV1> PreferredDuringSchedulingIgnoredDuringExecution { get; }
This property is typically used to express soft rules for pod placement, enabling the Kubernetes scheduler to give higher preference to certain nodes or configurations without mandating strict enforcement.
Represents a collection of hard affinity rules used during pod scheduling in Kubernetes. The `RequiredDuringSchedulingIgnoredDuringExecution` property contains a list of `PodAffinityTermV1` objects, each defining strict constraints that must be met for pod placement during scheduling. These constraints are mandatory for scheduling but are not enforced once the pod is running. This allows for ensuring initial placement conditions while tolerating changes in the cluster environment after the pod is already scheduled.
public List<PodAffinityTermV1> RequiredDuringSchedulingIgnoredDuringExecution { get; }