# FieldSelectorRequirementV1 Properties

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

Represents a requirement used in a field selector in Kubernetes resources. This class is used to specify a filtering condition based on certain attributes or values of a Kubernetes resource.

## Key

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

Gets or sets the key used in the field selector requirement. Represents the field key to match within the Kubernetes resource.

```csharp
public string Key { get; set; }
```

## Operator

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

Gets or sets the operator used to compare a field key against specified values.

```csharp
public string Operator { get; set; }
```

## Remarks

The value of this property defines the logical operator to be applied in the field selector requirement. Commonly used operators include "In", "NotIn", "Exists", and "DoesNotExist".

## Values

- Name: `Values`
- Modifiers: `get`
- Returns: `List<string>`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/5bd693ae1897dee5e2ce71c2cc08879c1c7eff51/src/Aspire.Hosting.Kubernetes/Resources/FieldSelectorRequirementV1.cs#L35)

Gets the list of values associated with this field selector requirement.

```csharp
public List<string> Values { get; }
```

## Remarks

This property represents the collection of values that correspond to the specified key and operator in the field selector requirement. These values are used to match specific criteria or conditions in Kubernetes resources.
