Update labels.md (#8102)
Update the example to show that labels are part of the metadata of an object.
This commit is contained in:
committed by
k8s-ci-robot
parent
a0132a2220
commit
da86ab8831
@@ -10,10 +10,12 @@ Labels can be used to organize and to select subsets of objects. Labels can be
|
|||||||
Each object can have a set of key/value labels defined. Each Key must be unique for a given object.
|
Each object can have a set of key/value labels defined. Each Key must be unique for a given object.
|
||||||
|
|
||||||
```json
|
```json
|
||||||
|
"metadata": {
|
||||||
"labels": {
|
"labels": {
|
||||||
"key1" : "value1",
|
"key1" : "value1",
|
||||||
"key2" : "value2"
|
"key2" : "value2"
|
||||||
}
|
}
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
We'll eventually index and reverse-index labels for efficient queries and watches, use them to sort and group in UIs and CLIs, etc. We don't want to pollute labels with non-identifying, especially large and/or structured, data. Non-identifying information should be recorded using [annotations](/docs/concepts/overview/working-with-objects/annotations/).
|
We'll eventually index and reverse-index labels for efficient queries and watches, use them to sort and group in UIs and CLIs, etc. We don't want to pollute labels with non-identifying, especially large and/or structured, data. Non-identifying information should be recorded using [annotations](/docs/concepts/overview/working-with-objects/annotations/).
|
||||||
|
|||||||
Reference in New Issue
Block a user