Skip to content
Docs Try Aspire

NodeAffinityV1

Class sealed net10.0
📦 Aspire.Hosting.Kubernetes v13.1.2-preview.1.26125.13
Represents node affinity scheduling configuration for Kubernetes pods. This class defines the rules to determine node selection for a pod during scheduling. Node affinity allows a pod to specify constraints that limit the set of nodes it can be scheduled onto. This includes both hard requirements (requiredDuringSchedulingIgnoredDuringExecution) and soft preferences (preferredDuringSchedulingIgnoredDuringExecution).
namespace Aspire.Hosting.Kubernetes.Resources;
public sealed class NodeAffinityV1
{
// ...
}
View all constructors
PreferredDuringSchedulingIgnoredDuringExecutionget
A list of preferred scheduling terms that influence the scheduling of a pod while ignoring the execution of the scheduling preferences. Each term in the list defines a preference for scheduling pods onto nodes based on specific criteria and associated weights.
RequiredDuringSchedulingIgnoredDuringExecutionget; set
Specifies node affinity rules that are required during scheduling but are not enforced during execution.
View all properties