# TolerationV1

- Kind: `class`
- Package: [Aspire.Hosting.Kubernetes](/reference/api/csharp/aspire.hosting.kubernetes.md)
- Version: `13.4.0-preview.1.26281.18`
- Namespace: `Aspire.Hosting.Kubernetes.Resources`
- Target framework: `net8.0`
- Source: [GitHub](https://github.com/microsoft/aspire/blob/becb48e2d61099e35ae336d527d3875e928d6594/src/Aspire.Hosting.Kubernetes/Resources/TolerationV1.cs)

Represents a toleration configuration for Kubernetes pods. Used to tolerate taints that would otherwise prevent a pod from being scheduled onto a node. Defines the behavior of tolerating taints based on key-value pairs, operators, effects, and optional toleration durations.

## Definition

```csharp
namespace Aspire.Hosting.Kubernetes.Resources;

public sealed class TolerationV1
{
    // ...
}
```

## Constructors

- [TolerationV1](/reference/api/csharp/aspire.hosting.kubernetes/tolerationv1/constructors.md#constructor)

## Properties

- [Effect](/reference/api/csharp/aspire.hosting.kubernetes/tolerationv1/properties.md#effect) : `string` `get; set` -- Gets or sets the taint effect to tolerate. Represents the taint effect that the toleration is associated with. Common values include "NoSchedule", "PreferNoSchedule", or "NoExecute".
- [Key](/reference/api/csharp/aspire.hosting.kubernetes/tolerationv1/properties.md#key) : `string` `get; set` -- Gets or sets the key used to identify a specific taint in Kubernetes scheduling rules. This property represents the label key that the toleration matches.
- [Operator](/reference/api/csharp/aspire.hosting.kubernetes/tolerationv1/properties.md#operator) : `string` `get; set` -- Specifies the operator that is applied to the key in a Kubernetes toleration. This property determines the way the key and value interact in the toleration specification.
- [TolerationSeconds](/reference/api/csharp/aspire.hosting.kubernetes/tolerationv1/properties.md#tolerationseconds) : `long?` `get; set` -- Specifies the duration (in seconds) for which a pod can tolerate a taint on a node. If this value is not set, the pod tolerates the taint indefinitely.
- [Value](/reference/api/csharp/aspire.hosting.kubernetes/tolerationv1/properties.md#value) : `string` `get; set` -- Gets or sets the value associated with the toleration. Typically defines the specific matching value for a taint's key, representing the condition the toleration satisfies.
