Skip to content

Commit cbff0cf

Browse files
authored
Merge pull request #32991 from jai/jai/fix-well-known-annotations-labels-taints-examples
fix: Well-Known Annotations/Labels/Taints examples
2 parents d39b19a + 8910148 commit cbff0cf

File tree

1 file changed

+41
-41
lines changed
  • content/en/docs/reference/labels-annotations-taints

1 file changed

+41
-41
lines changed

content/en/docs/reference/labels-annotations-taints/_index.md

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This document serves both as a reference to the values and as a coordination poi
1717

1818
### app.kubernetes.io/component
1919

20-
Example: `app.kubernetes.io/component=database`
20+
Example: `app.kubernetes.io/component: "database"`
2121

2222
Used on: All Objects
2323

@@ -27,7 +27,7 @@ One of the [recommended labels](/docs/concepts/overview/working-with-objects/com
2727

2828
### app.kubernetes.io/created-by
2929

30-
Example: `app.kubernetes.io/created-by=controller-manager`
30+
Example: `app.kubernetes.io/created-by: "controller-manager"`
3131

3232
Used on: All Objects
3333

@@ -37,7 +37,7 @@ One of the [recommended labels](/docs/concepts/overview/working-with-objects/com
3737

3838
### app.kubernetes.io/instance
3939

40-
Example: `app.kubernetes.io/instance=mysql-abcxzy`
40+
Example: `app.kubernetes.io/instance: "mysql-abcxzy"`
4141

4242
Used on: All Objects
4343

@@ -47,7 +47,7 @@ One of the [recommended labels](/docs/concepts/overview/working-with-objects/com
4747

4848
### app.kubernetes.io/managed-by
4949

50-
Example: `app.kubernetes.io/managed-by=helm`
50+
Example: `app.kubernetes.io/managed-by: "helm"`
5151

5252
Used on: All Objects
5353

@@ -57,7 +57,7 @@ One of the [recommended labels](/docs/concepts/overview/working-with-objects/com
5757

5858
### app.kubernetes.io/name
5959

60-
Example: `app.kubernetes.io/name=mysql`
60+
Example: `app.kubernetes.io/name: "mysql"`
6161

6262
Used on: All Objects
6363

@@ -67,7 +67,7 @@ One of the [recommended labels](/docs/concepts/overview/working-with-objects/com
6767

6868
### app.kubernetes.io/part-of
6969

70-
Example: `app.kubernetes.io/part-of=wordpress`
70+
Example: `app.kubernetes.io/part-of: "wordpress"`
7171

7272
Used on: All Objects
7373

@@ -77,7 +77,7 @@ One of the [recommended labels](/docs/concepts/overview/working-with-objects/com
7777

7878
### app.kubernetes.io/version
7979

80-
Example: `app.kubernetes.io/version="5.7.21"`
80+
Example: `app.kubernetes.io/version: "5.7.21"`
8181

8282
Used on: All Objects
8383

@@ -87,23 +87,23 @@ One of the [recommended labels](/docs/concepts/overview/working-with-objects/com
8787

8888
### kubernetes.io/arch
8989

90-
Example: `kubernetes.io/arch=amd64`
90+
Example: `kubernetes.io/arch: "amd64"`
9191

9292
Used on: Node
9393

9494
The Kubelet populates this with `runtime.GOARCH` as defined by Go. This can be handy if you are mixing arm and x86 nodes.
9595

9696
### kubernetes.io/os
9797

98-
Example: `kubernetes.io/os=linux`
98+
Example: `kubernetes.io/os: "linux"`
9999

100100
Used on: Node
101101

102102
The Kubelet populates this with `runtime.GOOS` as defined by Go. This can be handy if you are mixing operating systems in your cluster (for example: mixing Linux and Windows nodes).
103103

104104
### kubernetes.io/metadata.name
105105

106-
Example: `kubernetes.io/metadata.name=mynamespace`
106+
Example: `kubernetes.io/metadata.name: "mynamespace"`
107107

108108
Used on: Namespaces
109109

@@ -124,7 +124,7 @@ This label has been deprecated. Please use `kubernetes.io/os` instead.
124124

125125
### kubernetes.io/hostname {#kubernetesiohostname}
126126

127-
Example: `kubernetes.io/hostname=ip-172-20-114-199.ec2.internal`
127+
Example: `kubernetes.io/hostname: "ip-172-20-114-199.ec2.internal"`
128128

129129
Used on: Node
130130

@@ -135,7 +135,7 @@ This label is also used as part of the topology hierarchy. See [topology.kubern
135135

136136
### kubernetes.io/change-cause {#change-cause}
137137

138-
Example: `kubernetes.io/change-cause=kubectl edit --record deployment foo`
138+
Example: `kubernetes.io/change-cause: "kubectl edit --record deployment foo"`
139139

140140
Used on: All Objects
141141

@@ -161,7 +161,7 @@ The value for this annotation must be **true** to take effect. This annotation i
161161

162162
### controller.kubernetes.io/pod-deletion-cost {#pod-deletion-cost}
163163

164-
Example: `controller.kubernetes.io/pod-deletion-cost=10`
164+
Example: `controller.kubernetes.io/pod-deletion-cost: "10"`
165165

166166
Used on: Pod
167167

@@ -212,7 +212,7 @@ For example, `10M` means 10 megabits per second.
212212

213213
### node.kubernetes.io/instance-type {#nodekubernetesioinstance-type}
214214

215-
Example: `node.kubernetes.io/instance-type=m3.medium`
215+
Example: `node.kubernetes.io/instance-type: "m3.medium"`
216216

217217
Used on: Node
218218

@@ -237,7 +237,7 @@ See [topology.kubernetes.io/zone](#topologykubernetesiozone).
237237

238238
Example:
239239

240-
`statefulset.kubernetes.io/pod-name=mystatefulset-7`
240+
`statefulset.kubernetes.io/pod-name: "mystatefulset-7"`
241241

242242
When a StatefulSet controller creates a Pod for the StatefulSet, the control plane
243243
sets this label on that Pod. The value of the label is the name of the Pod being created.
@@ -249,15 +249,15 @@ StatefulSet topic for more details.
249249

250250
Example:
251251

252-
`topology.kubernetes.io/region=us-east-1`
252+
`topology.kubernetes.io/region: "us-east-1"`
253253

254254
See [topology.kubernetes.io/zone](#topologykubernetesiozone).
255255

256256
### topology.kubernetes.io/zone {#topologykubernetesiozone}
257257

258258
Example:
259259

260-
`topology.kubernetes.io/zone=us-east-1c`
260+
`topology.kubernetes.io/zone: "us-east-1c"`
261261

262262
Used on: Node, PersistentVolume
263263

@@ -286,7 +286,7 @@ adding the labels manually (or adding support for `PersistentVolumeLabel`). With
286286

287287
### volume.beta.kubernetes.io/storage-provisioner (deprecated)
288288

289-
Example: `volume.beta.kubernetes.io/storage-provisioner: k8s.io/minikube-hostpath`
289+
Example: `volume.beta.kubernetes.io/storage-provisioner: "k8s.io/minikube-hostpath"`
290290

291291
Used on: PersistentVolumeClaim
292292

@@ -310,7 +310,7 @@ This annotation will be added to dynamic provisioning required PVC.
310310

311311
### node.kubernetes.io/windows-build {#nodekubernetesiowindows-build}
312312

313-
Example: `node.kubernetes.io/windows-build=10.0.17763`
313+
Example: `node.kubernetes.io/windows-build: "10.0.17763"`
314314

315315
Used on: Node
316316

@@ -320,15 +320,15 @@ The label's value is in the format "MajorVersion.MinorVersion.BuildNumber".
320320

321321
### service.kubernetes.io/headless {#servicekubernetesioheadless}
322322

323-
Example: `service.kubernetes.io/headless=""`
323+
Example: `service.kubernetes.io/headless: ""`
324324

325325
Used on: Service
326326

327327
The control plane adds this label to an Endpoints object when the owning Service is headless.
328328

329329
### kubernetes.io/service-name {#kubernetesioservice-name}
330330

331-
Example: `kubernetes.io/service-name="nginx"`
331+
Example: `kubernetes.io/service-name: "nginx"`
332332

333333
Used on: Service
334334

@@ -354,23 +354,23 @@ ServiceAccount that the token (stored in the Secret of type `kubernetes.io/servi
354354

355355
### endpointslice.kubernetes.io/managed-by {#endpointslicekubernetesiomanaged-by}
356356

357-
Example: `endpointslice.kubernetes.io/managed-by="controller"`
357+
Example: `endpointslice.kubernetes.io/managed-by: "controller"`
358358

359359
Used on: EndpointSlices
360360

361361
The label is used to indicate the controller or entity that manages an EndpointSlice. This label aims to enable different EndpointSlice objects to be managed by different controllers or entities within the same cluster.
362362

363363
### endpointslice.kubernetes.io/skip-mirror {#endpointslicekubernetesioskip-mirror}
364364

365-
Example: `endpointslice.kubernetes.io/skip-mirror="true"`
365+
Example: `endpointslice.kubernetes.io/skip-mirror: "true"`
366366

367367
Used on: Endpoints
368368

369369
The label can be set to `"true"` on an Endpoints resource to indicate that the EndpointSliceMirroring controller should not mirror this resource with EndpointSlices.
370370

371371
### service.kubernetes.io/service-proxy-name {#servicekubernetesioservice-proxy-name}
372372

373-
Example: `service.kubernetes.io/service-proxy-name="foo-bar"`
373+
Example: `service.kubernetes.io/service-proxy-name: "foo-bar"`
374374

375375
Used on: Service
376376

@@ -382,7 +382,7 @@ Example: `experimental.windows.kubernetes.io/isolation-type: "hyperv"`
382382

383383
Used on: Pod
384384

385-
The annotation is used to run Windows containers with Hyper-V isolation. To use Hyper-V isolation feature and create a Hyper-V isolated container, the kubelet should be started with feature gates HyperVContainer=true and the Pod should include the annotation experimental.windows.kubernetes.io/isolation-type=hyperv.
385+
The annotation is used to run Windows containers with Hyper-V isolation. To use Hyper-V isolation feature and create a Hyper-V isolated container, the kubelet should be started with feature gates HyperVContainer=true and the Pod should include the annotation `experimental.windows.kubernetes.io/isolation-type: hyperv`.
386386

387387
{{< note >}}
388388
You can only set this annotation on Pods that have a single container.
@@ -405,7 +405,7 @@ Starting in v1.18, this annotation is deprecated in favor of `spec.ingressClassN
405405

406406
### storageclass.kubernetes.io/is-default-class
407407

408-
Example: `storageclass.kubernetes.io/is-default-class=true`
408+
Example: `storageclass.kubernetes.io/is-default-class: "true"`
409409

410410
Used on: StorageClass
411411

@@ -467,43 +467,43 @@ Use [Taints and Tolerations](/docs/concepts/scheduling-eviction/taint-and-tolera
467467

468468
### node.kubernetes.io/not-ready
469469

470-
Example: `node.kubernetes.io/not-ready:NoExecute`
470+
Example: `node.kubernetes.io/not-ready: "NoExecute"`
471471

472472
The node controller detects whether a node is ready by monitoring its health and adds or removes this taint accordingly.
473473

474474
### node.kubernetes.io/unreachable
475475

476-
Example: `node.kubernetes.io/unreachable:NoExecute`
476+
Example: `node.kubernetes.io/unreachable: "NoExecute"`
477477

478478
The node controller adds the taint to a node corresponding to the [NodeCondition](/docs/concepts/architecture/nodes/#condition) `Ready` being `Unknown`.
479479

480480
### node.kubernetes.io/unschedulable
481481

482-
Example: `node.kubernetes.io/unschedulable:NoSchedule`
482+
Example: `node.kubernetes.io/unschedulable: "NoSchedule"`
483483

484484
The taint will be added to a node when initializing the node to avoid race condition.
485485

486486
### node.kubernetes.io/memory-pressure
487487

488-
Example: `node.kubernetes.io/memory-pressure:NoSchedule`
488+
Example: `node.kubernetes.io/memory-pressure: "NoSchedule"`
489489

490490
The kubelet detects memory pressure based on `memory.available` and `allocatableMemory.available` observed on a Node. The observed values are then compared to the corresponding thresholds that can be set on the kubelet to determine if the Node condition and taint should be added/removed.
491491

492492
### node.kubernetes.io/disk-pressure
493493

494-
Example: `node.kubernetes.io/disk-pressure:NoSchedule`
494+
Example: `node.kubernetes.io/disk-pressure :"NoSchedule"`
495495

496496
The kubelet detects disk pressure based on `imagefs.available`, `imagefs.inodesFree`, `nodefs.available` and `nodefs.inodesFree`(Linux only) observed on a Node. The observed values are then compared to the corresponding thresholds that can be set on the kubelet to determine if the Node condition and taint should be added/removed.
497497

498498
### node.kubernetes.io/network-unavailable
499499

500-
Example: `node.kubernetes.io/network-unavailable:NoSchedule`
500+
Example: `node.kubernetes.io/network-unavailable: "NoSchedule"`
501501

502502
This is initially set by the kubelet when the cloud provider used indicates a requirement for additional network configuration. Only when the route on the cloud is configured properly will the taint be removed by the cloud provider.
503503

504504
### node.kubernetes.io/pid-pressure
505505

506-
Example: `node.kubernetes.io/pid-pressure:NoSchedule`
506+
Example: `node.kubernetes.io/pid-pressure: "NoSchedule"`
507507

508508
The kubelet checks D-value of the size of `/proc/sys/kernel/pid_max` and the PIDs consumed by Kubernetes on a node to get the number of available PIDs that referred to as the `pid.available` metric. The metric is then compared to the corresponding threshold that can be set on the kubelet to determine if the node condition and taint should be added/removed.
509509

@@ -524,19 +524,19 @@ for further details about when and how to use this taint.
524524

525525
### node.cloudprovider.kubernetes.io/uninitialized
526526

527-
Example: `node.cloudprovider.kubernetes.io/uninitialized:NoSchedule`
527+
Example: `node.cloudprovider.kubernetes.io/uninitialized: "NoSchedule"`
528528

529529
Sets this taint on a node to mark it as unusable, when kubelet is started with the "external" cloud provider, until a controller from the cloud-controller-manager initializes this node, and then removes the taint.
530530

531531
### node.cloudprovider.kubernetes.io/shutdown
532532

533-
Example: `node.cloudprovider.kubernetes.io/shutdown:NoSchedule`
533+
Example: `node.cloudprovider.kubernetes.io/shutdown: "NoSchedule"`
534534

535535
If a Node is in a cloud provider specified shutdown state, the Node gets tainted accordingly with `node.cloudprovider.kubernetes.io/shutdown` and the taint effect of `NoSchedule`.
536536

537537
### pod-security.kubernetes.io/enforce
538538

539-
Example: `pod-security.kubernetes.io/enforce: baseline`
539+
Example: `pod-security.kubernetes.io/enforce: "baseline"`
540540

541541
Used on: Namespace
542542

@@ -550,7 +550,7 @@ for more information.
550550

551551
### pod-security.kubernetes.io/enforce-version
552552

553-
Example: `pod-security.kubernetes.io/enforce-version: {{< skew latestVersion >}}`
553+
Example: `pod-security.kubernetes.io/enforce-version: "{{< skew latestVersion >}}"`
554554

555555
Used on: Namespace
556556

@@ -563,7 +563,7 @@ for more information.
563563

564564
### pod-security.kubernetes.io/audit
565565

566-
Example: `pod-security.kubernetes.io/audit: baseline`
566+
Example: `pod-security.kubernetes.io/audit: "baseline"`
567567

568568
Used on: Namespace
569569

@@ -577,7 +577,7 @@ for more information.
577577

578578
### pod-security.kubernetes.io/audit-version
579579

580-
Example: `pod-security.kubernetes.io/audit-version: {{< skew latestVersion >}}`
580+
Example: `pod-security.kubernetes.io/audit-version: "{{< skew latestVersion >}}"`
581581

582582
Used on: Namespace
583583

@@ -590,7 +590,7 @@ for more information.
590590

591591
### pod-security.kubernetes.io/warn
592592

593-
Example: `pod-security.kubernetes.io/warn: baseline`
593+
Example: `pod-security.kubernetes.io/warn: "baseline"`
594594

595595
Used on: Namespace
596596

@@ -606,7 +606,7 @@ for more information.
606606

607607
### pod-security.kubernetes.io/warn-version
608608

609-
Example: `pod-security.kubernetes.io/warn-version: {{< skew latestVersion >}}`
609+
Example: `pod-security.kubernetes.io/warn-version: "{{< skew latestVersion >}}"`
610610

611611
Used on: Namespace
612612

0 commit comments

Comments
 (0)