# PreferredSchedulingTermV1 Properties

- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Type: [PreferredSchedulingTermV1](/reference/api/csharp/aspire.hosting.kubernetes/preferredschedulingtermv1.md)
- Kind: `Properties`
- Members: `2`

Represents a preferred scheduling term used in Kubernetes node affinity configuration. Defines a preference for scheduling pods onto nodes based on specific criteria with an associated weight.

## Preference

- Name: `Preference`
- Modifiers: `get; set`
- Returns: [NodeSelectorTermV1](/reference/api/csharp/aspire.hosting.kubernetes/nodeselectortermv1.md)
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/PreferredSchedulingTermV1.cs)

Represents the preference for Kubernetes node scheduling policies.

```csharp
public NodeSelectorTermV1 Preference { get; set; }
```

## Remarks

This property specifies a [NodeSelectorTermV1](/reference/api/csharp/aspire.hosting.kubernetes/nodeselectortermv1.md) object, which defines node selection criteria for scheduling Kubernetes pods. The preference is used in conjunction with a weight to influence scheduling decisions.

## Weight

- Name: `Weight`
- Modifiers: `get; set`
- Returns: `int`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/PreferredSchedulingTermV1.cs)

Represents the weight assigned to a preferred scheduling condition.

```csharp
public int Weight { get; set; }
```

## Remarks

Weight determines the priority of a specific preference in node affinity rules when scheduling workloads in Kubernetes. A higher weight increases the likelihood that this preference will influence the node selection process.
