LabelSelectorV1 Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.
[YamlDotNet.Serialization.YamlSerializable]
public sealed class LabelSelectorV1
[<YamlDotNet.Serialization.YamlSerializable>]
type LabelSelectorV1 = class
Public NotInheritable Class LabelSelectorV1
- Inheritance
-
LabelSelectorV1
- Attributes
-
YamlDotNet.Serialization.YamlSerializableAttribute
Remarks
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.
Constructors
LabelSelectorV1() |
Represents a label selector used to determine a set of resources in Kubernetes that match the defined criteria. |
LabelSelectorV1(Dictionary<String,String>) |
Represents a label selector used to determine a set of resources in Kubernetes that match the defined criteria. |
Properties
MatchExpressions |
Represents a collection of label selector requirements used for matching Kubernetes resources. Each requirement specifies a key, an operator, and a set of values to define filtering criteria. This property is used to form more complex selection logic based on multiple conditions. |
MatchLabels |
A collection of key-value pairs used to specify matching labels for Kubernetes resources. Labels are utilized as selectors to filter or identify a subset of resources within a Kubernetes environment. |