Share via


LabelSelectorRequirementV1 Class

Definition

Represents a label selector requirement for Kubernetes resources. This is used to define conditions for filtering resources based on labels. Each requirement consists of a key, an operator, and a set of values that dictate how the label selector behaves.

[YamlDotNet.Serialization.YamlSerializable]
public sealed class LabelSelectorRequirementV1
[<YamlDotNet.Serialization.YamlSerializable>]
type LabelSelectorRequirementV1 = class
Public NotInheritable Class LabelSelectorRequirementV1
Inheritance
LabelSelectorRequirementV1
Attributes
YamlDotNet.Serialization.YamlSerializableAttribute

Constructors

LabelSelectorRequirementV1()

Properties

Key

Gets or sets the key that the selector applies to. This is used to specify the label key that should be matched against in the selector.

Operator

Gets or sets the operator to be applied in the context of label selection. Specifies the relationship between the key and values attributes required to satisfy the condition. Commonly used operators could include 'In', 'NotIn', 'Exists', or 'DoesNotExist'.

Values

Gets the collection of values that are associated with the label key in a selector requirement. This property represents a list of string values that must match or be compared against in accordance with the specified operator. The values are used to define matching criteria for labels in Kubernetes resources.

Applies to