Skip to content

Commit fd224a1

Browse files
authored
Merge pull request #43082 from kubernetes/dev-1.29
Official v1.29 Release Docs
2 parents 9b9d765 + 5682790 commit fd224a1

File tree

58 files changed

+5243
-3431
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+5243
-3431
lines changed

assets/scss/_custom.scss

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -392,52 +392,63 @@ footer {
392392
}
393393

394394
main {
395-
.td-content table code,
396-
.td-content>table td {
397-
word-break: break-word;
398-
}
399395

400-
/* SCSS Related to the Metrics Table */
396+
/* SCSS Related to the Metrics list */
397+
398+
div.metric:nth-of-type(odd) { // Look & Feel , Aesthetics
399+
background-color: $light-grey;
400+
}
401401

402-
@media (max-width: 767px) { // for mobile devices, Display the names, Stability levels & types
402+
div.metrics {
403403

404-
table.metrics {
405-
th:nth-child(n + 4),
406-
td:nth-child(n + 4) {
404+
.metric {
405+
div:empty{
407406
display: none;
408407
}
409408

410-
td.metric_type{
411-
min-width: 7em;
409+
display: flex;
410+
flex-direction: column;
411+
flex-wrap: wrap;
412+
gap: .75em;
413+
padding:.75em .75em .75em .75em;
414+
415+
.metric_name{
416+
font-size: large;
417+
font-weight: bold;
418+
word-break: break-word;
412419
}
413-
td.metric_stability_level{
414-
min-width: 6em;
420+
421+
label{
422+
font-weight: bold;
423+
margin-right: .5em;
415424
}
416-
}
417-
}
418-
419-
table.metrics tbody{ // Tested dimensions to improve overall aesthetic of the table
420-
tr {
421-
td {
422-
font-size: smaller;
423-
}
424-
td.metric_labels_varying{
425-
min-width: 9em;
426-
}
427-
td.metric_type{
428-
min-width: 9em;
425+
ul {
426+
li:empty{
427+
display: none;
429428
}
430-
td.metric_description{
431-
min-width: 10em;
429+
display: flex;
430+
flex-direction: column;
431+
gap: .75em;
432+
flex-wrap: wrap;
433+
li.metric_labels_varying{
434+
span{
435+
display: inline-block;
436+
background-color: rgb(240, 239, 239);
437+
padding: 0 0.5em;
438+
margin-right: .35em;
439+
font-family: monospace;
440+
border: 1px solid rgb(230 , 230 , 230);
441+
border-radius: 5%;
442+
margin-bottom: .35em;
443+
}
432444
}
433-
445+
434446
}
447+
435448
}
436449

437-
table.no-word-break td,
438-
table.no-word-break code {
439-
word-break: normal;
440-
}
450+
451+
}
441452
}
442453

443454
// blockquotes and callouts

content/en/docs/concepts/architecture/garbage-collection.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,20 @@ collection, which deletes images in order based on the last time they were used,
137137
starting with the oldest first. The kubelet deletes images
138138
until disk usage reaches the `LowThresholdPercent` value.
139139

140+
#### Garbage collection for unused container images {#image-maximum-age-gc}
141+
142+
{{< feature-state for_k8s_version="v1.29" state="alpha" >}}
143+
144+
As an alpha feature, you can specify the maximum time a local image can be unused for,
145+
regardless of disk usage. This is a kubelet setting that you configure for each node.
146+
147+
To configure the setting, enable the `ImageMaximumGCAge`
148+
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for the kubelet,
149+
and also set a value for the `ImageMaximumGCAge` field in the kubelet configuration file.
150+
151+
The value is specified as a Kubernetes _duration_; for example, you can set the configuration
152+
field to `3d12h`, which means 3 days and 12 hours.
153+
140154
### Container garbage collection {#container-image-garbage-collection}
141155

142156
The kubelet garbage collects unused containers based on the following variables,
@@ -178,4 +192,4 @@ configure garbage collection:
178192

179193
* Learn more about [ownership of Kubernetes objects](/docs/concepts/overview/working-with-objects/owners-dependents/).
180194
* Learn more about Kubernetes [finalizers](/docs/concepts/overview/working-with-objects/finalizers/).
181-
* Learn about the [TTL controller](/docs/concepts/workloads/controllers/ttlafterfinished/) that cleans up finished Jobs.
195+
* Learn about the [TTL controller](/docs/concepts/workloads/controllers/ttlafterfinished/) that cleans up finished Jobs.

content/en/docs/concepts/cluster-administration/flow-control.md

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ weight: 110
77

88
<!-- overview -->
99

10-
{{< feature-state state="beta" for_k8s_version="v1.20" >}}
10+
{{< feature-state state="stable" for_k8s_version="v1.29" >}}
1111

1212
Controlling the behavior of the Kubernetes API server in an overload situation
1313
is a key task for cluster administrators. The {{< glossary_tooltip
@@ -45,30 +45,27 @@ are not subject to the `--max-requests-inflight` limit.
4545

4646
## Enabling/Disabling API Priority and Fairness
4747

48-
The API Priority and Fairness feature is controlled by a feature gate
49-
and is enabled by default. See [Feature
50-
Gates](/docs/reference/command-line-tools-reference/feature-gates/)
51-
for a general explanation of feature gates and how to enable and
52-
disable them. The name of the feature gate for APF is
53-
"APIPriorityAndFairness". This feature also involves an {{<
54-
glossary_tooltip term_id="api-group" text="API Group" >}} with: (a) a
55-
`v1alpha1` version and a `v1beta1` version, disabled by default, and
56-
(b) `v1beta2` and `v1beta3` versions, enabled by default. You can
57-
disable the feature gate and API group beta versions by adding the
48+
The API Priority and Fairness feature is controlled by a command-line flag
49+
and is enabled by default. See
50+
[Options](/docs/reference/command-line-tools-reference/kube-apiserver/options/)
51+
for a general explanation of the available kube-apiserver command-line
52+
options and how to enable and disable them. The name of the
53+
command-line option for APF is "--enable-priority-and-fairness". This feature
54+
also involves an {{<glossary_tooltip term_id="api-group" text="API Group" >}}
55+
with: (a) a stable `v1` version, introduced in 1.29, and
56+
enabled by default (b) a `v1beta3` version, enabled by default, and
57+
deprecated in v1.29. You can
58+
disable the API group beta version `v1beta3` by adding the
5859
following command-line flags to your `kube-apiserver` invocation:
5960

6061
```shell
6162
kube-apiserver \
62-
--feature-gates=APIPriorityAndFairness=false \
63-
--runtime-config=flowcontrol.apiserver.k8s.io/v1beta2=false,flowcontrol.apiserver.k8s.io/v1beta3=false \
63+
--runtime-config=flowcontrol.apiserver.k8s.io/v1beta3=false \
6464
# …and other flags as usual
6565
```
6666

67-
Alternatively, you can enable the v1alpha1 and v1beta1 versions of the API group
68-
with `--runtime-config=flowcontrol.apiserver.k8s.io/v1alpha1=true,flowcontrol.apiserver.k8s.io/v1beta1=true`.
69-
7067
The command-line flag `--enable-priority-and-fairness=false` will disable the
71-
API Priority and Fairness feature, even if other flags have enabled it.
68+
API Priority and Fairness feature.
7269

7370
## Concepts
7471

@@ -178,14 +175,12 @@ server.
178175
## Resources
179176

180177
The flow control API involves two kinds of resources.
181-
[PriorityLevelConfigurations](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#prioritylevelconfiguration-v1beta2-flowcontrol-apiserver-k8s-io)
178+
[PriorityLevelConfigurations](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#prioritylevelconfiguration-v1-flowcontrol-apiserver-k8s-io)
182179
define the available priority levels, the share of the available concurrency
183180
budget that each can handle, and allow for fine-tuning queuing behavior.
184-
[FlowSchemas](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#flowschema-v1beta2-flowcontrol-apiserver-k8s-io)
181+
[FlowSchemas](/docs/reference/generated/kubernetes-api/{{< param "version" >}}/#flowschema-v1-flowcontrol-apiserver-k8s-io)
185182
are used to classify individual inbound requests, matching each to a
186-
single PriorityLevelConfiguration. There is also a `v1alpha1` version
187-
of the same API group, and it has the same Kinds with the same syntax and
188-
semantics.
183+
single PriorityLevelConfiguration.
189184

190185
### PriorityLevelConfiguration
191186

content/en/docs/concepts/cluster-administration/system-metrics.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,23 @@ Here is an example:
202202
--allow-label-value number_count_metric,odd_number='1,3,5', number_count_metric,even_number='2,4,6', date_gauge_metric,weekend='Saturday,Sunday'
203203
```
204204

205+
In addition to specifying this from the CLI, this can also be done within a configuration file. You
206+
can specify the path to that configuration file using the `--allow-metric-labels-manifest` command
207+
line argument to a component. Here's an example of the contents of that configuration file:
208+
209+
```yaml
210+
allow-list:
211+
- "metric1,label2": "v1,v2,v3"
212+
- "metric2,label1": "v1,v2,v3"
213+
```
214+
215+
Additionally, the `cardinality_enforcement_unexpected_categorizations_total` meta-metric records the
216+
count of unexpected categorizations during cardinality enforcement, that is, whenever a label value
217+
is encountered that is not allowed with respect to the allow-list contraints.
218+
205219
## {{% heading "whatsnext" %}}
206220

207221
* Read about the [Prometheus text format](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-based-format)
208222
for metrics
209223
* See the list of [stable Kubernetes metrics](https://github.com/kubernetes/kubernetes/blob/master/test/instrumentation/testdata/stable-metrics-list.yaml)
210-
* Read about the [Kubernetes deprecation policy](/docs/reference/using-api/deprecation-policy/#deprecating-a-feature-or-behavior)
211-
224+
* Read about the [Kubernetes deprecation policy](/docs/reference/using-api/deprecation-policy/#deprecating-a-feature-or-behavior)

content/en/docs/concepts/containers/container-lifecycle-hooks.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,15 @@ There are two types of hook handlers that can be implemented for Containers:
5555
* Exec - Executes a specific command, such as `pre-stop.sh`, inside the cgroups and namespaces of the Container.
5656
Resources consumed by the command are counted against the Container.
5757
* HTTP - Executes an HTTP request against a specific endpoint on the Container.
58+
* Sleep - Pauses the container for a specified duration.
59+
The "Sleep" action is available when the [feature gate](/docs/reference/command-line-tool-reference/feagure-gates/)
60+
`PodLifecycleSleepAction` is enabled.
5861

5962
### Hook handler execution
6063

6164
When a Container lifecycle management hook is called,
6265
the Kubernetes management system executes the handler according to the hook action,
63-
`httpGet` and `tcpSocket` are executed by the kubelet process, and `exec` is executed in the container.
66+
`httpGet` , `tcpSocket` and `sleep` are executed by the kubelet process, and `exec` is executed in the container.
6467

6568
Hook handler calls are synchronous within the context of the Pod containing the Container.
6669
This means that for a `PostStart` hook,

content/en/docs/concepts/containers/images.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,17 @@ that Kubernetes will keep trying to pull the image, with an increasing back-off
159159
Kubernetes raises the delay between each attempt until it reaches a compiled-in limit,
160160
which is 300 seconds (5 minutes).
161161

162+
### Image pull per runtime class
163+
164+
{{< feature-state for_k8s_version="v1.29" state="alpha" >}}
165+
Kubernetes includes alpha support for performing image pulls based on the RuntimeClass of a Pod.
166+
167+
If you enable the `RuntimeClassInImageCriApi` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/),
168+
the kubelet references container images by a tuple of (image name, runtime handler) rather than just the
169+
image name or digest. Your {{< glossary_tooltip text="container runtime" term_id="container-runtime" >}}
170+
may adapt its behavior based on the selected runtime handler.
171+
Pulling images based on runtime class will be helpful for VM based containers like windows hyperV containers.
172+
162173
## Serial and parallel image pulls
163174

164175
By default, kubelet pulls images serially. In other words, kubelet sends only

content/en/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,8 @@ The general workflow of a device plugin includes the following steps:
159159
{{< note >}}
160160
The processing of the fully-qualified CDI device names by the Device Manager requires
161161
that the `DevicePluginCDIDevices` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
162-
is enabled for the kubelet and the kube-apiserver. This was added as an alpha feature in Kubernetes
163-
v1.28.
162+
is enabled for both the kubelet and the kube-apiserver. This was added as an alpha feature in Kubernetes
163+
v1.28 and graduated to beta in v1.29.
164164
{{< /note >}}
165165

166166
### Handling kubelet restarts

content/en/docs/concepts/scheduling-eviction/assign-pod-node.md

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,108 @@ The affinity term is applied to namespaces selected by both `namespaceSelector`
358358
Note that an empty `namespaceSelector` ({}) matches all namespaces, while a null or empty `namespaces` list and
359359
null `namespaceSelector` matches the namespace of the Pod where the rule is defined.
360360

361+
#### matchLabelKeys
362+
363+
{{< feature-state for_k8s_version="v1.29" state="alpha" >}}
364+
365+
{{< note >}}
366+
<!-- UPDATE THIS WHEN PROMOTING TO BETA -->
367+
The `matchLabelKeys` field is a alpha-level field and is disabled by default in
368+
Kubernetes {{< skew currentVersion >}}.
369+
When you want to use it, you have to enable it via the
370+
`MatchLabelKeysInPodAffinity` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
371+
{{< /note >}}
372+
373+
Kubernetes includes an optional `matchLabelKeys` field for Pod affinity
374+
or anti-affinity. The field specifies keys for the labels that should match with the incoming Pod's labels,
375+
when satisfying the Pod (anti)affinity.
376+
377+
The keys are used to look up values from the pod labels; those key-value labels are combined
378+
(using `AND`) with the match restrictions defined using the `labelSelector` field. The combined
379+
filtering selects the set of existing pods that will be taken into Pod (anti)affinity calculation.
380+
381+
A common use case is to use `matchLabelKeys` with `pod-template-hash` (set on Pods
382+
managed as part of a Deployment, where the value is unique for each revision).
383+
Using `pod-template-hash` in `matchLabelKeys` allows you to target the Pods that belong
384+
to the same revision as the incoming Pod, so that a rolling upgrade won't break affinity.
385+
386+
```yaml
387+
apiVersion: apps/v1
388+
kind: Deployment
389+
metadata:
390+
name: application-server
391+
...
392+
spec:
393+
template:
394+
affinity:
395+
podAffinity:
396+
requiredDuringSchedulingIgnoredDuringExecution:
397+
- labelSelector:
398+
matchExpressions:
399+
- key: app
400+
operator: In
401+
values:
402+
- database
403+
topologyKey: topology.kubernetes.io/zone
404+
# Only Pods from a given rollout are taken into consideration when calculating pod affinity.
405+
# If you update the Deployment, the replacement Pods follow their own affinity rules
406+
# (if there are any defined in the new Pod template)
407+
matchLabelKeys:
408+
- pod-template-hash
409+
```
410+
411+
#### mismatchLabelKeys
412+
413+
{{< feature-state for_k8s_version="v1.29" state="alpha" >}}
414+
415+
{{< note >}}
416+
<!-- UPDATE THIS WHEN PROMOTING TO BETA -->
417+
The `mismatchLabelKeys` field is a alpha-level field and is disabled by default in
418+
Kubernetes {{< skew currentVersion >}}.
419+
When you want to use it, you have to enable it via the
420+
`MatchLabelKeysInPodAffinity` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
421+
{{< /note >}}
422+
423+
Kubernetes includes an optional `mismatchLabelKeys` field for Pod affinity
424+
or anti-affinity. The field specifies keys for the labels that should **not** match with the incoming Pod's labels,
425+
when satisfying the Pod (anti)affinity.
426+
427+
One example use case is to ensure Pods go to the topology domain (node, zone, etc) where only Pods from the same tenant or team are scheduled in.
428+
In other words, you want to avoid running Pods from two different tenants on the same topology domain at the same time.
429+
430+
```yaml
431+
apiVersion: v1
432+
kind: Pod
433+
metadata:
434+
labels:
435+
# Assume that all relevant Pods have a "tenant" label set
436+
tenant: tenant-a
437+
...
438+
spec:
439+
affinity:
440+
podAffinity:
441+
requiredDuringSchedulingIgnoredDuringExecution:
442+
# ensure that pods associated with this tenant land on the correct node pool
443+
- matchLabelKeys:
444+
- tenant
445+
topologyKey: node-pool
446+
podAntiAffinity:
447+
requiredDuringSchedulingIgnoredDuringExecution:
448+
# ensure that pods associated with this tenant can't schedule to nodes used for another tenant
449+
- mismatchLabelKeys:
450+
- tenant # whatever the value of the "tenant" label for this Pod, prevent
451+
# scheduling to nodes in any pool where any Pod from a different
452+
# tenant is running.
453+
labelSelector:
454+
# We have to have the labelSelector which selects only Pods with the tenant label,
455+
# otherwise this Pod would hate Pods from daemonsets as well, for example,
456+
# which aren't supposed to have the tenant label.
457+
matchExpressions:
458+
- key: tenant
459+
operator: Exists
460+
topologyKey: node-pool
461+
```
462+
361463
#### More practical use-cases
362464

363465
Inter-pod affinity and anti-affinity can be even more useful when they are used with higher

content/en/docs/concepts/scheduling-eviction/dynamic-resource-allocation.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,17 @@ gets scheduled onto one node and then cannot run there, which is bad because
162162
such a pending Pod also blocks all other resources like RAM or CPU that were
163163
set aside for it.
164164
165+
{{< note >}}
166+
167+
Scheduling of pods which use ResourceClaims is going to be slower because of
168+
the additional communication that is required. Beware that this may also impact
169+
pods that don't use ResourceClaims because only one pod at a time gets
170+
scheduled, blocking API calls are made while handling a pod with
171+
ResourceClaims, and thus scheduling the next pod gets delayed.
172+
173+
{{< /note >}}
174+
175+
165176
## Monitoring resources
166177
167178
The kubelet provides a gRPC service to enable discovery of dynamic resources of

0 commit comments

Comments
 (0)