Skip to content

Commit 01efbac

Browse files
committed
fix: Well-Known Annotations/Labels/Taints examples
1 parent 3920b5e commit 01efbac

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

@@ -174,7 +174,7 @@ which allows users to influence ReplicaSet downscaling order. The annotation par
174174

175175
### node.kubernetes.io/instance-type {#nodekubernetesioinstance-type}
176176

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

179179
Used on: Node
180180

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

200200
Example:
201201

202-
`statefulset.kubernetes.io/pod-name=mystatefulset-7`
202+
`statefulset.kubernetes.io/pod-name: "mystatefulset-7"`
203203

204204
When a StatefulSet controller creates a Pod for the StatefulSet, the control plane
205205
sets this label on that Pod. The value of the label is the name of the Pod being created.
@@ -211,15 +211,15 @@ StatefulSet topic for more details.
211211

212212
Example:
213213

214-
`topology.kubernetes.io/region=us-east-1`
214+
`topology.kubernetes.io/region: "us-east-1"`
215215

216216
See [topology.kubernetes.io/zone](#topologykubernetesiozone).
217217

218218
### topology.kubernetes.io/zone {#topologykubernetesiozone}
219219

220220
Example:
221221

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

224224
Used on: Node, PersistentVolume
225225

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

249249
### volume.beta.kubernetes.io/storage-provisioner (deprecated)
250250

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

253253
Used on: PersistentVolumeClaim
254254

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

273273
### node.kubernetes.io/windows-build {#nodekubernetesiowindows-build}
274274

275-
Example: `node.kubernetes.io/windows-build=10.0.17763`
275+
Example: `node.kubernetes.io/windows-build: "10.0.17763"`
276276

277277
Used on: Node
278278

@@ -282,39 +282,39 @@ The label's value is in the format "MajorVersion.MinorVersion.BuildNumber".
282282

283283
### service.kubernetes.io/headless {#servicekubernetesioheadless}
284284

285-
Example: `service.kubernetes.io/headless=""`
285+
Example: `service.kubernetes.io/headless: ""`
286286

287287
Used on: Service
288288

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

291291
### kubernetes.io/service-name {#kubernetesioservice-name}
292292

293-
Example: `kubernetes.io/service-name="nginx"`
293+
Example: `kubernetes.io/service-name: "nginx"`
294294

295295
Used on: Service
296296

297297
Kubernetes uses this label to differentiate multiple Services. Used currently for `ELB`(Elastic Load Balancer) only.
298298

299299
### endpointslice.kubernetes.io/managed-by {#endpointslicekubernetesiomanaged-by}
300300

301-
Example: `endpointslice.kubernetes.io/managed-by="controller"`
301+
Example: `endpointslice.kubernetes.io/managed-by: "controller"`
302302

303303
Used on: EndpointSlices
304304

305305
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.
306306

307307
### endpointslice.kubernetes.io/skip-mirror {#endpointslicekubernetesioskip-mirror}
308308

309-
Example: `endpointslice.kubernetes.io/skip-mirror="true"`
309+
Example: `endpointslice.kubernetes.io/skip-mirror: "true"`
310310

311311
Used on: Endpoints
312312

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

315315
### service.kubernetes.io/service-proxy-name {#servicekubernetesioservice-proxy-name}
316316

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

319319
Used on: Service
320320

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

327327
Used on: Pod
328328

329-
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.
329+
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`.
330330

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

350350
### storageclass.kubernetes.io/is-default-class
351351

352-
Example: `storageclass.kubernetes.io/is-default-class=true`
352+
Example: `storageclass.kubernetes.io/is-default-class: true`
353353

354354
Used on: StorageClass
355355

@@ -411,61 +411,61 @@ Use [Taints and Tolerations](/docs/concepts/scheduling-eviction/taint-and-tolera
411411

412412
### node.kubernetes.io/not-ready
413413

414-
Example: `node.kubernetes.io/not-ready:NoExecute`
414+
Example: `node.kubernetes.io/not-ready: "NoExecute"`
415415

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

418418
### node.kubernetes.io/unreachable
419419

420-
Example: `node.kubernetes.io/unreachable:NoExecute`
420+
Example: `node.kubernetes.io/unreachable: "NoExecute"`
421421

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

424424
### node.kubernetes.io/unschedulable
425425

426-
Example: `node.kubernetes.io/unschedulable:NoSchedule`
426+
Example: `node.kubernetes.io/unschedulable: "NoSchedule"`
427427

428428
The taint will be added to a node when initializing the node to avoid race condition.
429429

430430
### node.kubernetes.io/memory-pressure
431431

432-
Example: `node.kubernetes.io/memory-pressure:NoSchedule`
432+
Example: `node.kubernetes.io/memory-pressure: "NoSchedule"`
433433

434434
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.
435435

436436
### node.kubernetes.io/disk-pressure
437437

438-
Example: `node.kubernetes.io/disk-pressure:NoSchedule`
438+
Example: `node.kubernetes.io/disk-pressure :"NoSchedule"`
439439

440440
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.
441441

442442
### node.kubernetes.io/network-unavailable
443443

444-
Example: `node.kubernetes.io/network-unavailable:NoSchedule`
444+
Example: `node.kubernetes.io/network-unavailable: "NoSchedule"`
445445

446446
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.
447447

448448
### node.kubernetes.io/pid-pressure
449449

450-
Example: `node.kubernetes.io/pid-pressure:NoSchedule`
450+
Example: `node.kubernetes.io/pid-pressure: "NoSchedule"`
451451

452452
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.
453453

454454
### node.cloudprovider.kubernetes.io/uninitialized
455455

456-
Example: `node.cloudprovider.kubernetes.io/uninitialized:NoSchedule`
456+
Example: `node.cloudprovider.kubernetes.io/uninitialized: "NoSchedule"`
457457

458458
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.
459459

460460
### node.cloudprovider.kubernetes.io/shutdown
461461

462-
Example: `node.cloudprovider.kubernetes.io/shutdown:NoSchedule`
462+
Example: `node.cloudprovider.kubernetes.io/shutdown: "NoSchedule"`
463463

464464
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`.
465465

466466
### pod-security.kubernetes.io/enforce
467467

468-
Example: `pod-security.kubernetes.io/enforce: baseline`
468+
Example: `pod-security.kubernetes.io/enforce: "baseline"`
469469

470470
Used on: Namespace
471471

@@ -479,7 +479,7 @@ for more information.
479479

480480
### pod-security.kubernetes.io/enforce-version
481481

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

484484
Used on: Namespace
485485

@@ -492,7 +492,7 @@ for more information.
492492

493493
### pod-security.kubernetes.io/audit
494494

495-
Example: `pod-security.kubernetes.io/audit: baseline`
495+
Example: `pod-security.kubernetes.io/audit: "baseline"`
496496

497497
Used on: Namespace
498498

@@ -506,7 +506,7 @@ for more information.
506506

507507
### pod-security.kubernetes.io/audit-version
508508

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

511511
Used on: Namespace
512512

@@ -519,7 +519,7 @@ for more information.
519519

520520
### pod-security.kubernetes.io/warn
521521

522-
Example: `pod-security.kubernetes.io/warn: baseline`
522+
Example: `pod-security.kubernetes.io/warn: "baseline"`
523523

524524
Used on: Namespace
525525

@@ -535,7 +535,7 @@ for more information.
535535

536536
### pod-security.kubernetes.io/warn-version
537537

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

540540
Used on: Namespace
541541

0 commit comments

Comments
 (0)