Working with labels and selectors
Labels are a set of key/value pairs, which are attached to object metadata. We could use labels to select, organize and group objects, such as pods, replication controllers and services. Labels are not necessarily unique. Objects could carry the same set of labels.
Label selectors are used to query objects via labels. Current supported selector types are:
- Equality-based label selector
- Set-based label selector
- Empty label selector
- Null label selector
An equality-based label selector is a set of equality requirements, which could filter labels by equal or non-equal operation. A set-based label selector is used to filter labels by a set of values, and currently supports
notin operators. When a label value matches ...