Skip to content

Commit 4bb80ef

Browse files
authored
Merge pull request #39535 from Zhuzhenghao/working-with-objects
Tidy concepts pages within Label and Annotation
2 parents 516a23a + 3ca95d6 commit 4bb80ef

File tree

2 files changed

+5
-13
lines changed

2 files changed

+5
-13
lines changed

content/en/docs/concepts/overview/working-with-objects/annotations.md

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ weight: 60
88
You can use Kubernetes annotations to attach arbitrary non-identifying metadata
99
to objects. Clients such as tools and libraries can retrieve this metadata.
1010

11-
1211
<!-- body -->
1312
## Attaching metadata to objects
1413

@@ -74,10 +73,9 @@ If the prefix is omitted, the annotation Key is presumed to be private to the us
7473

7574
The `kubernetes.io/` and `k8s.io/` prefixes are reserved for Kubernetes core components.
7675

77-
For example, here's the configuration file for a Pod that has the annotation `imageregistry: https://hub.docker.com/` :
76+
For example, here's a manifest for a Pod that has the annotation `imageregistry: https://hub.docker.com/` :
7877

7978
```yaml
80-
8179
apiVersion: v1
8280
kind: Pod
8381
metadata:
@@ -90,14 +88,8 @@ spec:
9088
image: nginx:1.14.2
9189
ports:
9290
- containerPort: 80
93-
9491
```
9592
96-
97-
9893
## {{% heading "whatsnext" %}}
9994
10095
Learn more about [Labels and Selectors](/docs/concepts/overview/working-with-objects/labels/).
101-
102-
103-

content/en/docs/concepts/overview/working-with-objects/labels.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Valid label value:
7979
* unless empty, must begin and end with an alphanumeric character (`[a-z0-9A-Z]`),
8080
* could contain dashes (`-`), underscores (`_`), dots (`.`), and alphanumerics between.
8181

82-
For example, here's the configuration file for a Pod that has two labels
82+
For example, here's a manifest for a Pod that has two labels
8383
`environment: production` and `app: nginx`:
8484

8585
```yaml
@@ -259,7 +259,7 @@ or
259259

260260
```yaml
261261
selector:
262-
component: redis
262+
component: redis
263263
```
264264

265265
This selector (respectively in `json` or `yaml` format) is equivalent to
@@ -278,8 +278,8 @@ selector:
278278
matchLabels:
279279
component: redis
280280
matchExpressions:
281-
- {key: tier, operator: In, values: [cache]}
282-
- {key: environment, operator: NotIn, values: [dev]}
281+
- { key: tier, operator: In, values: [cache] }
282+
- { key: environment, operator: NotIn, values: [dev] }
283283
```
284284

285285
`matchLabels` is a map of `{key,value}` pairs. A single `{key,value}` in the

0 commit comments

Comments
 (0)