# PodsMetricSourceV2

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

Represents a configuration for targeting metrics at the pod level in a Kubernetes environment. Provides specification for a metric associated with pod resources and the target value or criteria for monitoring and scaling purposes.

## Definition

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

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

## Remarks

This class is designed for serializing and deserializing Kubernetes pod metric configurations in YAML format. It contains a metric identifier and a target specification to enable monitoring and scaling based on custom or predefined pod metrics.

## Constructors

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

## Properties

- [Metric](/reference/api/csharp/aspire.hosting.kubernetes/podsmetricsourcev2/properties.md#metric) : [MetricIdentifierV2](/reference/api/csharp/aspire.hosting.kubernetes/metricidentifierv2.md) `get; set` -- Represents the metric associated with a Kubernetes PodsMetricSourceV2 resource.
- [Target](/reference/api/csharp/aspire.hosting.kubernetes/podsmetricsourcev2/properties.md#target) : [MetricTargetV2](/reference/api/csharp/aspire.hosting.kubernetes/metrictargetv2.md) `get; set` -- Defines the target configuration for a Kubernetes metric in version 2. Specifies the intended target values or utilization for the metric, used for monitoring and scaling purposes.
