Skip to content
Docs Try Aspire

LabelSelectorV1

Class sealed net10.0
📦 Aspire.Hosting.Kubernetes v13.1.2-preview.1.26125.13
Represents a label selector for Kubernetes resources. A label selector is used to filter resources based on their labels, enabling selection of a specific set of objects in a dynamic way.
namespace Aspire.Hosting.Kubernetes.Resources;
public sealed class LabelSelectorV1
{
// ...
}
The selector can contain two key components: - MatchLabels: A dictionary of key-value pairs where the resource labels must match exactly. - MatchExpressions: A list of label selector requirements that allow more complex filtering rules.