Skip to content

Commit 0180cc4

Browse files
authored
Merge pull request #41165 from kubernetes/dev-1.28
Official 1.28 Release Docs
2 parents beb7d1c + e05d2b7 commit 0180cc4

File tree

86 files changed

+10270
-24721
lines changed

Some content is hidden

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

86 files changed

+10270
-24721
lines changed

api-ref-assets/api/swagger.json

+7,820-23,666
Large diffs are not rendered by default.

api-ref-assets/config/fields.yaml

+14-1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
- fields:
8989
- nominatedNodeName
9090
- hostIP
91+
- hostIPs
9192
- startTime
9293
- phase
9394
- message
@@ -99,6 +100,7 @@
99100
- initContainerStatuses
100101
- containerStatuses
101102
- ephemeralContainerStatuses
103+
- resourceClaimStatuses
102104
- resize
103105

104106
- definition: io.k8s.api.core.v1.Container
@@ -137,6 +139,7 @@
137139
- livenessProbe
138140
- readinessProbe
139141
- startupProbe
142+
- restartPolicy
140143
- name: Security Context
141144
fields:
142145
- securityContext
@@ -228,6 +231,7 @@
228231
fields:
229232
- terminationMessagePath
230233
- terminationMessagePolicy
234+
- restartPolicy
231235
- name: Debugging
232236
fields:
233237
- stdin
@@ -393,9 +397,14 @@
393397
fields:
394398
- selector
395399
- manualSelector
396-
- name: Alpha level
400+
- name: Beta level
397401
fields:
398402
- podFailurePolicy
403+
- name: Alpha level
404+
fields:
405+
- backoffLimitPerIndex
406+
- maxFailedIndexes
407+
- podReplacementPolicy
399408

400409
- definition: io.k8s.api.batch.v1.JobStatus
401410
field_categories:
@@ -411,6 +420,10 @@
411420
- name: Beta level
412421
fields:
413422
- ready
423+
- name: Alpha level
424+
fields:
425+
- failedIndexes
426+
- terminating
414427

415428
- definition: io.k8s.api.batch.v1.CronJobSpec
416429
field_categories:

api-ref-assets/config/toc.yaml

+2-5
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ parts:
153153
version: v1alpha1
154154
- name: SelfSubjectReview
155155
group: authentication.k8s.io
156-
version: v1beta1
156+
version: v1
157157
- name: Authorization Resources
158158
chapters:
159159
- name: LocalSubjectAccessReview
@@ -168,9 +168,6 @@ parts:
168168
- name: SubjectAccessReview
169169
group: authorization.k8s.io
170170
version: v1
171-
- name: SelfSubjectReview
172-
group: authentication.k8s.io
173-
version: v1alpha1
174171
- name: ClusterRole
175172
group: rbac.authorization.k8s.io
176173
version: v1
@@ -218,7 +215,7 @@ parts:
218215
version: v1
219216
- name: ValidatingAdmissionPolicy
220217
group: admissionregistration.k8s.io
221-
version: v1alpha1
218+
version: v1beta1
222219
otherDefinitions:
223220
- ValidatingAdmissionPolicyList
224221
- ValidatingAdmissionPolicyBinding

content/en/blog/_posts/2022-09-14-pod-has-network-condition.md

+7
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ per container characteristics like image size or payload) can utilize the
2323
the `PodHasNetwork` condition to optimize the set of actions performed when pods
2424
repeatedly fail to come up.
2525

26+
### Updates for Kubernetes 1.28
27+
28+
The `PodHasNetwork` condition has been renamed to `PodReadyToStartContainers`.
29+
Alongside that change, the feature gate `PodHasNetworkCondition` has been replaced by
30+
`PodReadyToStartContainersCondition`. You need to set `PodReadyToStartContainersCondition`
31+
to true in order to use the new feature in v1.28.0 and later.
32+
2633
### How is this different from the existing Initialized condition reported for pods?
2734

2835
The kubelet sets the status of the existing `Initialized` condition reported in
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
reviewers:
3+
- jpbetz
4+
title: Mixed Version Proxy
5+
content_type: concept
6+
weight: 220
7+
---
8+
9+
<!-- overview -->
10+
{{< feature-state state="alpha" for_k8s_version="v1.28" >}}
11+
12+
Kubernetes {{< skew currentVersion >}} includes an alpha feature that lets a
13+
{{< glossary_tooltip text="API Server" term_id="kube-apiserver" >}}
14+
proxy a resource requests to other _peer_ API servers. This is useful when there are multiple
15+
API servers running different versions of Kubernetes in one cluster (for example, during a long-lived
16+
rollout to a new release of Kubernetes).
17+
18+
This enables cluster administrators to configure highly available clusters that can be upgraded
19+
more safely, by directing resource requests (made during the upgrade) to the correct kube-apiserver.
20+
That proxying prevents users from seeing unexpected 404 Not Found errors that stem
21+
from the upgrade process.
22+
23+
This mechanism is called the _Mixed Version Proxy_.
24+
25+
## Enabling the Mixed Version Proxy
26+
Ensure that `UnknownVersionInteroperabilityProxy` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
27+
is enabled when you start the {{< glossary_tooltip text="API Server" term_id="kube-apiserver" >}}:
28+
29+
```shell
30+
kube-apiserver \
31+
--feature-gates=UnknownVersionInteroperabilityProxy=true \
32+
# required command line arguments for this feature
33+
--peer-ca-file=<path to kube-apiserver CA cert>
34+
--proxy-client-cert-file=<path to aggregator proxy cert>,
35+
--proxy-client-key-file=<path to aggregator proxy key>,
36+
--requestheader-client-ca-file=<path to aggregator CA cert>,
37+
# requestheader-allowed-names can be set to blank to allow any Common Name
38+
--requestheader-allowed-names=<valid Common Names to verify proxy client cert against>,
39+
40+
# optional flags for this feature
41+
--peer-advertise-ip=`IP of this kube-apiserver that should be used by peers to proxy requests`
42+
--peer-advertise-port=`port of this kube-apiserver that should be used by peers to proxy requests`
43+
44+
# …and other flags as usual
45+
```
46+
47+
### Proxy transport and authentication between API servers {#transport-and-authn}
48+
49+
* The source kube-apiserver reuses the [existing APIserver client authentication flags](https://kubernetes.io/docs/tasks/extend-kubernetes/configure-aggregation-layer/#kubernetes-apiserver-client-authentication) `--proxy-client-cert-file` and `--proxy-client-key-file` to present its identity that will be verified by its peer (the destination kube-apiserver). The destination API server verifies that peer connection based on the configuration you specify using the `--requestheader-client-ca-file` command line argument.
50+
51+
* To authenticate the destination server's serving certs, you must configure a certificate authority bundle by specifying the `--peer-ca-file` command line argument to the **source** API server.
52+
53+
### Configuration for peer API server connectivity
54+
55+
To set the network location of a kube-apiserver that peers will use to proxy requests, use the
56+
`--peer-advertise-ip` and `--peer-advertise-port` command line arguments to kube-apiserver or specify
57+
these fields in the API server configuration file.
58+
If these flags are unspecified, peers will use the value from either `--advertise-address` or
59+
`--bind-address` command line argument to the kube-apiserver. If those too, are unset, the host's default interface is used.
60+
61+
## Mixed version proxying
62+
63+
When you enable mixed version proxying, the [aggregation layer](/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/)
64+
loads a special filter that does the following:
65+
66+
* When a resource request reaches an API server that cannot serve that API (either because it is at a version pre-dating the introduction of the API or the API is turned off on the API server) the API server attempts to send the request to a peer API server that can serve the requested API. It does so by identifying API groups / versions / resources that the local server doesn't recognise, and tries to proxy those requests to a peer API server that is capable of handling the request.
67+
* If the peer API server fails to respond, the _source_ API server responds with 503("Service Unavailable") error.
68+
69+
### How it works under the hood
70+
71+
When an API Server receives a resource request, it first checks which API servers can serve the requested resource. This check happens using the internal [`StorageVersion` API].
72+
73+
* If the resource is known to the API server that received the request (ex: `GET /api/v1/pods/some-pod`), the request is handled locally.
74+
75+
* If there is no internal `StorageVersion` object found for the requested resource (ex: `GET /my-api/v1/my-resource`) and the configured APIService specifies proxying to an extension API server, that proxying happens following the usual
76+
[flow](/docs/tasks/extend-kubernetes/configure-aggregation-layer/) for
77+
extension APIs.
78+
79+
* If a valid internal `StorageVersion` object is found for the requested resource (ex: `GET /batch/v1/jobs`) and the API server trying to handle the request (the _handling API server_) has the `batch` API disabled, then the _handling API server_fetches the peer API servers that do serve the relevant API group / version / resource (`api/v1/batch` in this case) using the information in the fetched `StorageVersion` object. The _handling API server_ then proxies the request to one of the matching peer kube-apiservers that are aware of the requested resource.
80+
* If there is no peer known for that API group / version / resource, the handling API server passes the request to its own handler chain which should eventually return a 404("Not Found") response.
81+
* If the handling API server has identified and selected a peer API server, but that peer fails
82+
to respond (for reasons such as network connectivity issues, or a data race between the request
83+
being received and a controller registering the peer's info into the control plane), then the handling
84+
API server responds with a 503 (“Service Unavailable”) error.

content/en/docs/concepts/architecture/nodes.md

+27-20
Original file line numberDiff line numberDiff line change
@@ -571,9 +571,9 @@ the feature is Beta and is enabled by default.
571571
Metrics `graceful_shutdown_start_time_seconds` and `graceful_shutdown_end_time_seconds`
572572
are emitted under the kubelet subsystem to monitor node shutdowns.
573573

574-
## Non Graceful node shutdown {#non-graceful-node-shutdown}
574+
## Non-graceful node shutdown handling {#non-graceful-node-shutdown}
575575

576-
{{< feature-state state="beta" for_k8s_version="v1.26" >}}
576+
{{< feature-state state="stable" for_k8s_version="v1.28" >}}
577577

578578
A node shutdown action may not be detected by kubelet's Node Shutdown Manager,
579579
either because the command does not trigger the inhibitor locks mechanism used by
@@ -617,11 +617,7 @@ During a non-graceful shutdown, Pods are terminated in the two phases:
617617

618618
## Swap memory management {#swap-memory}
619619

620-
{{< feature-state state="alpha" for_k8s_version="v1.22" >}}
621-
622-
Prior to Kubernetes 1.22, nodes did not support the use of swap memory, and a
623-
kubelet would by default fail to start if swap was detected on a node. In 1.22
624-
onwards, swap memory support can be enabled on a per-node basis.
620+
{{< feature-state state="beta" for_k8s_version="v1.28" >}}
625621

626622
To enable swap on a node, the `NodeSwap` feature gate must be enabled on
627623
the kubelet, and the `--fail-swap-on` command line flag or `failSwapOn`
@@ -638,29 +634,40 @@ specify how a node will use swap memory. For example,
638634

639635
```yaml
640636
memorySwap:
641-
swapBehavior: LimitedSwap
637+
swapBehavior: UnlimitedSwap
642638
```
643639

644-
The available configuration options for `swapBehavior` are:
645-
646-
- `LimitedSwap`: Kubernetes workloads are limited in how much swap they can
647-
use. Workloads on the node not managed by Kubernetes can still swap.
648-
- `UnlimitedSwap`: Kubernetes workloads can use as much swap memory as they
640+
- `UnlimitedSwap` (default): Kubernetes workloads can use as much swap memory as they
649641
request, up to the system limit.
642+
- `LimitedSwap`: The utilization of swap memory by Kubernetes workloads is subject to limitations. Only Pods of Burstable QoS are permitted to employ swap.
650643

651644
If configuration for `memorySwap` is not specified and the feature gate is
652645
enabled, by default the kubelet will apply the same behaviour as the
653-
`LimitedSwap` setting.
646+
`UnlimitedSwap` setting.
647+
648+
With `LimitedSwap`, Pods that do not fall under the Burstable QoS classification (i.e.
649+
`BestEffort`/`Guaranteed` Qos Pods) are prohibited from utilizing swap memory.
650+
To maintain the aforementioned security and node
651+
health guarantees, these Pods are not permitted to use swap memory when `LimitedSwap` is
652+
in effect.
653+
654+
Prior to detailing the calculation of the swap limit, it is necessary to define the following terms:
655+
* `nodeTotalMemory`: The total amount of physical memory available on the node.
656+
* `totalPodsSwapAvailable`: The total amount of swap memory on the node that is available for use by Pods (some swap memory may be reserved for system use).
657+
* `containerMemoryRequest`: The container's memory request.
658+
659+
Swap limitation is configured as:
660+
`(containerMemoryRequest / nodeTotalMemory) * totalPodsSwapAvailable`.
654661

655-
The behaviour of the `LimitedSwap` setting depends if the node is running with
656-
v1 or v2 of control groups (also known as "cgroups"):
662+
It is important to note that, for containers within Burstable QoS Pods, it is possible to
663+
opt-out of swap usage by specifying memory requests that are equal to memory limits.
664+
Containers configured in this manner will not have access to swap memory.
657665

658-
- **cgroupsv1:** Kubernetes workloads can use any combination of memory and
659-
swap, up to the pod's memory limit, if set.
660-
- **cgroupsv2:** Kubernetes workloads cannot use swap memory.
666+
Swap is supported only with **cgroup v2**, cgroup v1 is not supported.
661667

662668
For more information, and to assist with testing and provide feedback, please
663-
see [KEP-2400](https://github.com/kubernetes/enhancements/issues/2400) and its
669+
see the blog-post about [Kubernetes 1.28: NodeSwap graduates to Beta1](/blog/2023/07/18/swap-beta1-1.28-2023/),
670+
[KEP-2400](https://github.com/kubernetes/enhancements/issues/4128) and its
664671
[design proposal](https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/2400-node-swap/README.md).
665672

666673
## {{% heading "whatsnext" %}}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ Aggregated APIs offer more advanced API features and customization of other feat
209209

210210
| Feature | Description | CRDs | Aggregated API |
211211
| ------- | ----------- | ---- | -------------- |
212-
| Validation | Help users prevent errors and allow you to evolve your API independently of your clients. These features are most useful when there are many clients who can't all update at the same time. | Yes. Most validation can be specified in the CRD using [OpenAPI v3.0 validation](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation). Any other validations supported by addition of a [Validating Webhook](/docs/reference/access-authn-authz/admission-controllers/#validatingadmissionwebhook-alpha-in-1-8-beta-in-1-9). | Yes, arbitrary validation checks |
212+
| Validation | Help users prevent errors and allow you to evolve your API independently of your clients. These features are most useful when there are many clients who can't all update at the same time. | Yes. Most validation can be specified in the CRD using [OpenAPI v3.0 validation](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation). [CRDValidationRatcheting](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation-ratcheting) feature gate allows failing validations specified using OpenAPI also can be ignored if the failing part of the resource was unchanged. Any other validations supported by addition of a [Validating Webhook](/docs/reference/access-authn-authz/admission-controllers/#validatingadmissionwebhook-alpha-in-1-8-beta-in-1-9). | Yes, arbitrary validation checks |
213213
| Defaulting | See above | Yes, either via [OpenAPI v3.0 validation](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#defaulting) `default` keyword (GA in 1.17), or via a [Mutating Webhook](/docs/reference/access-authn-authz/admission-controllers/#mutatingadmissionwebhook) (though this will not be run when reading from etcd for old objects). | Yes |
214214
| Multi-versioning | Allows serving the same object through two API versions. Can help ease API changes like renaming fields. Less important if you control your client versions. | [Yes](/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning) | Yes |
215215
| Custom Storage | If you need storage with a different performance mode (for example, a time-series database instead of key-value store) or isolation for security (for example, encryption of sensitive information, etc.) | No | Yes |

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

+18-14
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,22 @@ The general workflow of a device plugin includes the following steps:
147147
runtime configurations for accessing the allocated devices. The kubelet passes this information
148148
to the container runtime.
149149

150+
An `AllocateResponse` contains zero or more `ContainerAllocateResponse` objects. In these, the
151+
device plugin defines modifications that must be made to a container's definition to provide
152+
access to the device. These modifications include:
153+
154+
* annotations
155+
* device nodes
156+
* environment variables
157+
* mounts
158+
* fully-qualified CDI device names
159+
160+
{{< note >}}
161+
The processing of the fully-qualified CDI device names by the Device Manager requires
162+
the `DevicePluginCDIDevices` feature gate to be enabled. This was added as an alpha feature in
163+
v1.28.
164+
{{< /note >}}
165+
150166
### Handling kubelet restarts
151167

152168
A device plugin is expected to detect kubelet restarts and re-register itself with the new
@@ -195,7 +211,7 @@ of the device allocations during the upgrade.
195211

196212
## Monitoring device plugin resources
197213

198-
{{< feature-state for_k8s_version="v1.15" state="beta" >}}
214+
{{< feature-state for_k8s_version="v1.28" state="stable" >}}
199215

200216
In order to monitor resources provided by device plugins, monitoring agents need to be able to
201217
discover the set of devices that are in-use on the node and obtain metadata to describe which
@@ -312,7 +328,7 @@ below:
312328

313329
### `GetAllocatableResources` gRPC endpoint {#grpc-endpoint-getallocatableresources}
314330

315-
{{< feature-state state="beta" for_k8s_version="v1.23" >}}
331+
{{< feature-state state="stable" for_k8s_version="v1.28" >}}
316332

317333
GetAllocatableResources provides information on resources initially available on the worker node.
318334
It provides more information than kubelet exports to APIServer.
@@ -338,16 +354,6 @@ message AllocatableResourcesResponse {
338354
}
339355
```
340356

341-
Starting from Kubernetes v1.23, the `GetAllocatableResources` is enabled by default.
342-
You can disable it by turning off the `KubeletPodResourcesGetAllocatable`
343-
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/).
344-
345-
Preceding Kubernetes v1.23, to enable this feature `kubelet` must be started with the following flag:
346-
347-
```
348-
--feature-gates=KubeletPodResourcesGetAllocatable=true
349-
```
350-
351357
`ContainerDevices` do expose the topology information declaring to which NUMA cells the device is
352358
affine. The NUMA cells are identified using a opaque integer ID, which value is consistent to
353359
what device plugins report
@@ -381,8 +387,6 @@ Support for the `PodResourcesLister service` requires `KubeletPodResources`
381387
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to be enabled.
382388
It is enabled by default starting with Kubernetes 1.15 and is v1 since Kubernetes 1.20.
383389

384-
385-
386390
### `Get` gRPC endpoint {#grpc-endpoint-get}
387391

388392
{{< feature-state state="alpha" for_k8s_version="v1.27" >}}

0 commit comments

Comments
 (0)