Skip to content

Commit 7295018

Browse files
authored
Merge pull request #48159 from kubernetes/dev-1.32
Official 1.32 Release Docs
2 parents cd9b5fe + 426f5e2 commit 7295018

File tree

185 files changed

+7475
-571
lines changed

Some content is hidden

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

185 files changed

+7475
-571
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Compatibility Version For Kubernetes Control Plane Components
3+
reviewers:
4+
- jpbetz
5+
- siyuanfoundation
6+
content_type: concept
7+
weight: 70
8+
---
9+
10+
<!-- overview -->
11+
12+
Since release v1.32, we introduced configurable version compatibility and emulation options to Kubernetes control plane components to make upgrades safer by providing more control and increasing the granularity of steps available to cluster administrators.
13+
14+
<!-- body -->
15+
16+
## Emulated Version
17+
18+
The emulation option is set by the `--emulated-version` flag of control plane components. It allows the component to emulate the behavior (APIs, features, ...) of an earlier version of Kubernetes.
19+
20+
When used, the capabilities available will match the emulated version:
21+
* Any capabilities present in the binary version that were introduced after the emulation version will be unavailable.
22+
* Any capabilities removed after the emulation version will be available.
23+
24+
This enables a binary from a particular Kubernetes release to emulate the behavior of a previous version with sufficient fidelity that interoperability with other system components can be defined in terms of the emulated version.
25+
26+
The `--emulated-version` must be <= `binaryVersion`. See the help message of the `--emulated-version` flag for supported range of emulated versions.

content/en/docs/concepts/cluster-administration/logging.md

+31
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,37 @@ appending a container name to the command, with a `-c` flag, like so:
7575
kubectl logs counter -c count
7676
```
7777

78+
79+
### Container log streams
80+
81+
{{< feature-state feature_gate_name="PodLogsQuerySplitStreams" >}}
82+
83+
As an alpha feature, the kubelet can split out the logs from the two standard streams produced
84+
by a container: [standard output](https://en.wikipedia.org/wiki/Standard_streams#Standard_output_(stdout))
85+
and [standard error](https://en.wikipedia.org/wiki/Standard_streams#Standard_error_(stderr)).
86+
To use this behavior, you must enable the `PodLogsQuerySplitStreams`
87+
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
88+
With that feature gate enabled, Kubernetes {{< skew currentVersion >}} allows access to these
89+
log streams directly via the Pod API. You can fetch a specific stream by specifying the stream name (either `Stdout` or `Stderr`),
90+
using the `stream` query string. You must have access to read the `log` subresource of that Pod.
91+
92+
To demonstrate this feature, you can create a Pod that periodically writes text to both the standard output and error stream.
93+
94+
{{% code_sample file="debug/counter-pod-err.yaml" %}}
95+
96+
To run this pod, use the following command:
97+
98+
```shell
99+
kubectl apply -f https://k8s.io/examples/debug/counter-pod-err.yaml
100+
```
101+
102+
To fetch only the stderr log stream, you can run:
103+
104+
```shell
105+
kubectl get --raw "/api/v1/namespaces/default/pods/counter-err/log?stream=Stderr"
106+
```
107+
108+
78109
See the [`kubectl logs` documentation](/docs/reference/generated/kubectl/kubectl-commands#logs)
79110
for more details.
80111

content/en/docs/concepts/cluster-administration/node-shutdown.md

+23-3
Original file line numberDiff line numberDiff line change
@@ -217,9 +217,7 @@ these pods will be stuck in terminating status on the shutdown node forever.
217217

218218
To mitigate the above situation, a user can manually add the taint `node.kubernetes.io/out-of-service`
219219
with either `NoExecute` or `NoSchedule` effect to a Node marking it out-of-service.
220-
If the `NodeOutOfServiceVolumeDetach`[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
221-
is enabled on {{< glossary_tooltip text="kube-controller-manager" term_id="kube-controller-manager" >}},
222-
and a Node is marked out-of-service with this taint, the pods on the node will be forcefully deleted
220+
If a Node is marked out-of-service with this taint, the pods on the node will be forcefully deleted
223221
if there are no matching tolerations on it and volume detach operations for the pods terminating on
224222
the node will happen immediately. This allows the Pods on the out-of-service node to recover quickly
225223
on a different node.
@@ -267,6 +265,28 @@ via the [Non-Graceful Node Shutdown](#non-graceful-node-shutdown) procedure ment
267265
{{< /note >}}
268266

269267

268+
## Windows Graceful node shutdown {#windows-graceful-node-shutdown}
269+
270+
{{< feature-state feature_gate_name="WindowsGracefulNodeShutdown" >}}
271+
272+
The Windows graceful node shutdown feature depends on kubelet running as a Windows service,
273+
it will then have a registered [service control handler](https://learn.microsoft.com/en-us/windows/win32/services/service-control-handler-function)
274+
to delay the presshutdown event with a given duration.
275+
276+
Windows graceful node shutdown is controlled with the `WindowsGracefulNodeShutdown`
277+
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
278+
which is introduced in 1.32 as an alpha feature.
279+
280+
Windows graceful node shutdown can not be cancelled.
281+
282+
If Kubelet is not running as a Windows service, it will not be able to set and monitor
283+
the [Preshutdown](https://learn.microsoft.com/en-us/windows/win32/api/winsvc/ns-winsvc-service_preshutdown_info) event,
284+
the node will have to go through the [Non-Graceful Node Shutdown](#non-graceful-node-shutdown) procedure mentioned above.
285+
286+
In the case where the Windows graceful node shutdown feature is enabled, but the kubelet is not
287+
running as a Windows service, the kubelet will continue running instead of failing. However,
288+
it will log an error indicating that it needs to be run as a Windows service.
289+
270290
## {{% heading "whatsnext" %}}
271291

272292
Learn more about the following:

content/en/docs/concepts/configuration/manage-resources-containers.md

+33
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,26 @@ a Pod.
109109
For a particular resource, a *Pod resource request/limit* is the sum of the
110110
resource requests/limits of that type for each container in the Pod.
111111

112+
## Pod-level resource specification
113+
114+
{{< feature-state feature_gate_name="PodLevelResources" >}}
115+
116+
Starting in Kubernetes 1.32, you can also specify resource requests and limits at
117+
the Pod level. the Pod level. At Pod level, Kubernetes {{< skew currentVersion >}}
118+
only supports resource requests or limits for specific resource types: `cpu` and /
119+
or `memory`. This feature is currently in alpha and with the feature enabled,
120+
Kubernetes allows you to declare an overall resource budget for the Pod, which is
121+
especially helpful when dealing with a large number of containers where it can be
122+
difficult to accurately gauge individual resource needs. Additionally, it enables
123+
containers within a Pod to share idle resources with each other, improving resource
124+
utilization.
125+
126+
For a Pod, you can specify resource limits and requests for CPU and memory by including the following:
127+
* `spec.resources.limits.cpu`
128+
* `spec.resources.limits.memory`
129+
* `spec.resources.requests.cpu`
130+
* `spec.resources.requests.memory`
131+
112132
## Resource units in Kubernetes
113133

114134
### CPU resource units {#meaning-of-cpu}
@@ -192,6 +212,19 @@ spec:
192212
cpu: "500m"
193213
```
194214
215+
## Pod resources example {#example-2}
216+
217+
{{< feature-state feature_gate_name="PodLevelResources" >}}
218+
219+
The following Pod has an explicit request of 1 CPU and 100 MiB of memory, and an
220+
explicit limit of 1 CPU and 200 MiB of memory. The `pod-resources-demo-ctr-1`
221+
container has explicit requests and limits set. However, the
222+
`pod-resources-demo-ctr-2` container will simply share the resources available
223+
within the Pod resource boundaries, as it does not have explicit requests and limits
224+
set.
225+
226+
{{% code_sample file="pods/resource/pod-level-resources.yaml" %}}
227+
195228
## How Pods with resource requests are scheduled
196229

197230
When you create a Pod, the Kubernetes scheduler selects a node for the Pod to

content/en/docs/concepts/configuration/secret.md

+1-4
Original file line numberDiff line numberDiff line change
@@ -666,10 +666,7 @@ Therefore, one Pod does not have access to the Secrets of another Pod.
666666

667667
### Configure least-privilege access to Secrets
668668

669-
To enhance the security measures around Secrets, Kubernetes provides a mechanism: you can
670-
annotate a ServiceAccount as `kubernetes.io/enforce-mountable-secrets: "true"`.
671-
672-
For more information, you can refer to the [documentation about this annotation](/docs/concepts/security/service-accounts/#enforce-mountable-secrets).
669+
To enhance the security measures around Secrets, use separate namespaces to isolate access to mounted secrets.
673670

674671
{{< warning >}}
675672
Any containers that run with `privileged: true` on a node can access all

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

+4
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ Resources consumed by the command are counted against the Container.
5858
* Sleep - Pauses the container for a specified duration.
5959
This is a beta-level feature default enabled by the `PodLifecycleSleepAction` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
6060

61+
{{< note >}}
62+
Enable the `PodLifecycleSleepActionAllowZero` feature gate if you want to set a sleep duration of zero seconds (effectively a no-op) for your Sleep lifecycle hooks.
63+
{{< /note >}}
64+
6165
### Hook handler execution
6266

6367
When a Container lifecycle management hook is called,

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ behalf of the two different Pods, when parallel image pulls is enabled.
214214

215215
### Maximum parallel image pulls
216216

217-
{{< feature-state for_k8s_version="v1.27" state="alpha" >}}
217+
{{< feature-state for_k8s_version="v1.32" state="beta" >}}
218218

219219
When `serializeImagePulls` is set to false, the kubelet defaults to no limit on the
220220
maximum number of images being pulled at the same time. If you would like to

content/en/docs/concepts/extend-kubernetes/api-extension/custom-resources.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,8 @@ may also be used with field selectors when included in the `spec.versions[*].sel
316316
{{< feature-state feature_gate_name="CustomResourceFieldSelectors" >}}
317317

318318
The `spec.versions[*].selectableFields` field of a {{< glossary_tooltip term_id="CustomResourceDefinition" text="CustomResourceDefinition" >}} may be used to
319-
declare which other fields in a custom resource may be used in field selectors
320-
with the feature of `CustomResourceFieldSelectors`
321-
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) (This feature gate is enabled by default since Kubernetes v1.31).
319+
declare which other fields in a custom resource may be used in field selectors.
320+
322321
The following example adds the `.spec.color` and `.spec.size` fields as
323322
selectable fields.
324323

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

+9-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ Error from server (BadRequest): Unable to find "ingresses" that match label sele
4646
| Node | `spec.unschedulable` |
4747
| CertificateSigningRequest | `spec.signerName` |
4848

49+
### Custom resources fields
50+
51+
All custom resource types support the `metadata.name` and `metadata.namespace` fields.
52+
53+
Additionally, the `spec.versions[*].selectableFields` field of a {{< glossary_tooltip term_id="CustomResourceDefinition" text="CustomResourceDefinition" >}}
54+
declares which other fields in a custom resource may be used in field selectors. See [selectable fields for custom resources](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#crd-selectable-fields)
55+
for more information about how to use field selectors with CustomResourceDefinitions.
56+
4957
## Supported operators
5058

5159
You can use the `=`, `==`, and `!=` operators with field selectors (`=` and `==` mean the same thing). This `kubectl` command, for example, selects all Kubernetes Services that aren't in the `default` namespace:
@@ -72,4 +80,4 @@ You can use field selectors across multiple resource types. This `kubectl` comma
7280

7381
```shell
7482
kubectl get statefulsets,services --all-namespaces --field-selector metadata.namespace!=default
75-
```
83+
```

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

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ of the same resource. API resources are distinguished by their API group, resour
3232
In cases when objects represent a physical entity, like a Node representing a physical host, when the host is re-created under the same name without deleting and re-creating the Node, Kubernetes treats the new host as the old one, which may lead to inconsistencies.
3333
{{< /note >}}
3434

35+
The server may generate a name when `generateName` is provided instead of `name` in a resource create request.
36+
When `generateName` is used, the provided value is used as a name prefix, which server appends a generated suffix
37+
to. Even though the name is generated, it may conflict with existing names resulting in a HTTP 409 resopnse. This
38+
became far less likely to happen in Kubernetes v1.31 and later, since the server will make up to 8 attempt to generate a
39+
unique name before returning a HTTP 409 response.
40+
3541
Below are four types of commonly used name constraints for resources.
3642

3743
### DNS Subdomain Names

0 commit comments

Comments
 (0)