Skip to content

Commit fe170db

Browse files
authored
Merge branch 'dev-1.22' into merged-master-dev-1.22
2 parents 3c95e6a + 96c8939 commit fe170db

File tree

9 files changed

+602
-33
lines changed

9 files changed

+602
-33
lines changed

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

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,23 @@ weight: 60
1313

1414
System component traces record the latency of and relationships between operations in the cluster.
1515

16-
Kubernetes components emit traces using the [OpenTelemetry Protocol](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md#opentelemetry-protocol-specification) with the gRPC exporter and can be collected and routed to tracing backends using an [OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector#-opentelemetry-collector).
16+
Kubernetes components emit traces using the
17+
[OpenTelemetry Protocol](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/otlp.md#opentelemetry-protocol-specification)
18+
with the gRPC exporter and can be collected and routed to tracing backends using an
19+
[OpenTelemetry Collector](https://github.com/open-telemetry/opentelemetry-collector#-opentelemetry-collector).
1720

1821
<!-- body -->
1922

2023
## Trace Collection
2124

22-
For a complete guide to collecting traces and using the collector, see [Getting Started with the OpenTelemetry Collector](https://opentelemetry.io/docs/collector/getting-started/). However, there are a few things to note that are specific to Kubernetes components.
25+
For a complete guide to collecting traces and using the collector, see
26+
[Getting Started with the OpenTelemetry Collector](https://opentelemetry.io/docs/collector/getting-started/).
27+
However, there are a few things to note that are specific to Kubernetes components.
2328

24-
By default, Kubernetes components export traces using the grpc exporter for OTLP on the [IANA OpenTelemetry port](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=opentelemetry), 4317. As an example, if the collector is running as a sidecar to a Kubernetes component, the following receiver configuration will collect spans and log them to standard output:
29+
By default, Kubernetes components export traces using the grpc exporter for OTLP on the
30+
[IANA OpenTelemetry port](https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xhtml?search=opentelemetry), 4317.
31+
As an example, if the collector is running as a sidecar to a Kubernetes component,
32+
the following receiver configuration will collect spans and log them to standard output:
2533

2634
```yaml
2735
receivers:
@@ -43,11 +51,19 @@ service:
4351
4452
### kube-apiserver traces
4553
46-
The kube-apiserver generates spans for incoming HTTP requests, and for outgoing requests to webhooks, etcd, and re-entrant requests. It propagates the [W3C Trace Context](https://www.w3.org/TR/trace-context/) with outgoing requests but does not make use of the trace context attached to incoming requests, as the kube-apiserver is often a public endpoint.
54+
The kube-apiserver generates spans for incoming HTTP requests, and for outgoing requests
55+
to webhooks, etcd, and re-entrant requests. It propagates the
56+
[W3C Trace Context](https://www.w3.org/TR/trace-context/) with outgoing requests
57+
but does not make use of the trace context attached to incoming requests,
58+
as the kube-apiserver is often a public endpoint.
4759
4860
#### Enabling tracing in the kube-apiserver
4961
50-
To enable tracing, enable the `APIServerTracing` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) on the kube-apiserver. Also, provide the kube-apiserver with a tracing configration file with `--tracing-config-file=<path-to-config>`. This is an example config that records spans for 1 in 10000 requests, and uses the default OpenTelemetry endpoint:
62+
To enable tracing, enable the `APIServerTracing`
63+
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
64+
on the kube-apiserver. Also, provide the kube-apiserver with a tracing configration file
65+
with `--tracing-config-file=<path-to-config>`. This is an example config that records
66+
spans for 1 in 10000 requests, and uses the default OpenTelemetry endpoint:
5167

5268
```yaml
5369
apiVersion: apiserver.config.k8s.io/v1alpha1
@@ -57,10 +73,17 @@ kind: TracingConfiguration
5773
samplingRatePerMillion: 100
5874
```
5975

76+
For more information about the `TracingConfiguration` struct, see
77+
[API server config API (v1alpha1)](/docs/reference/config-api/apiserver-config.v1alpha1/#apiserver-k8s-io-v1alpha1-TracingConfiguration).
78+
6079
## Stability
6180

62-
Tracing instrumentation is still under active development, and may change in a variety of ways. This includes span names, attached attributes, instrumented endpoints, etc. Until this feature graduates to stable, there are no guarantees of backwards compatibility for tracing instrumentation.
81+
Tracing instrumentation is still under active development, and may change
82+
in a variety of ways. This includes span names, attached attributes,
83+
instrumented endpoints, etc. Until this feature graduates to stable,
84+
there are no guarantees of backwards compatibility for tracing instrumentation.
6385

6486
## {{% heading "whatsnext" %}}
6587

6688
* Read about [Getting Started with the OpenTelemetry Collector](https://opentelemetry.io/docs/collector/getting-started/)
89+

content/en/docs/concepts/services-networking/service.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,10 @@ selectors and uses DNS names instead. For more information, see the
188188
[ExternalName](#externalname) section later in this document.
189189

190190
### Over Capacity Endpoints
191-
If an Endpoints resource has more than 1000 endpoints then a Kubernetes v1.21
192-
cluster annotates that Endpoints with `endpoints.kubernetes.io/over-capacity: warning`.
193-
This annotation indicates that the affected Endpoints object is over capacity.
191+
If an Endpoints resource has more than 1000 endpoints then a Kubernetes v1.22 (or later)
192+
cluster annotates that Endpoints with `endpoints.kubernetes.io/over-capacity: truncated`.
193+
This annotation indicates that the affected Endpoints object is over capacity and that
194+
the endpoints controller has truncated the number of endpoints to 1000.
194195

195196
### EndpointSlices
196197

content/en/docs/concepts/storage/persistent-volumes.md

Lines changed: 100 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -415,37 +415,40 @@ The access modes are:
415415
* ReadWriteOnce -- the volume can be mounted as read-write by a single node
416416
* ReadOnlyMany -- the volume can be mounted read-only by many nodes
417417
* ReadWriteMany -- the volume can be mounted as read-write by many nodes
418+
* ReadWriteOncePod -- the volume can be mounted as read-write by a single Pod.
419+
This is only supported for CSI volumes and Kubernetes version 1.22+.
418420

419421
In the CLI, the access modes are abbreviated to:
420422

421423
* RWO - ReadWriteOnce
422424
* ROX - ReadOnlyMany
423425
* RWX - ReadWriteMany
426+
* RWOP - ReadWriteOncePod
424427

425428
> __Important!__ A volume can only be mounted using one access mode at a time, even if it supports many. For example, a GCEPersistentDisk can be mounted as ReadWriteOnce by a single node or ReadOnlyMany by many nodes, but not at the same time.
426429

427430

428-
| Volume Plugin | ReadWriteOnce | ReadOnlyMany | ReadWriteMany|
429-
| :--- | :---: | :---: | :---: |
430-
| AWSElasticBlockStore | &#x2713; | - | - |
431-
| AzureFile | &#x2713; | &#x2713; | &#x2713; |
432-
| AzureDisk | &#x2713; | - | - |
433-
| CephFS | &#x2713; | &#x2713; | &#x2713; |
434-
| Cinder | &#x2713; | - | - |
435-
| CSI | depends on the driver | depends on the driver | depends on the driver |
436-
| FC | &#x2713; | &#x2713; | - |
437-
| FlexVolume | &#x2713; | &#x2713; | depends on the driver |
438-
| Flocker | &#x2713; | - | - |
439-
| GCEPersistentDisk | &#x2713; | &#x2713; | - |
440-
| Glusterfs | &#x2713; | &#x2713; | &#x2713; |
441-
| HostPath | &#x2713; | - | - |
442-
| iSCSI | &#x2713; | &#x2713; | - |
443-
| Quobyte | &#x2713; | &#x2713; | &#x2713; |
444-
| NFS | &#x2713; | &#x2713; | &#x2713; |
445-
| RBD | &#x2713; | &#x2713; | - |
446-
| VsphereVolume | &#x2713; | - | - (works when Pods are collocated) |
447-
| PortworxVolume | &#x2713; | - | &#x2713; |
448-
| StorageOS | &#x2713; | - | - |
431+
| Volume Plugin | ReadWriteOnce | ReadOnlyMany | ReadWriteMany | ReadWriteOncePod |
432+
| :--- | :---: | :---: | :---: | - |
433+
| AWSElasticBlockStore | &#x2713; | - | - | - |
434+
| AzureFile | &#x2713; | &#x2713; | &#x2713; | - |
435+
| AzureDisk | &#x2713; | - | - | - |
436+
| CephFS | &#x2713; | &#x2713; | &#x2713; | - |
437+
| Cinder | &#x2713; | - | - | - |
438+
| CSI | depends on the driver | depends on the driver | depends on the driver | depends on the driver |
439+
| FC | &#x2713; | &#x2713; | - | - |
440+
| FlexVolume | &#x2713; | &#x2713; | depends on the driver | - |
441+
| Flocker | &#x2713; | - | - | - |
442+
| GCEPersistentDisk | &#x2713; | &#x2713; | - | - |
443+
| Glusterfs | &#x2713; | &#x2713; | &#x2713; | - |
444+
| HostPath | &#x2713; | - | - | - |
445+
| iSCSI | &#x2713; | &#x2713; | - | - |
446+
| Quobyte | &#x2713; | &#x2713; | &#x2713; | - |
447+
| NFS | &#x2713; | &#x2713; | &#x2713; | - |
448+
| RBD | &#x2713; | &#x2713; | - | - |
449+
| VsphereVolume | &#x2713; | - | - (works when Pods are collocated) | - |
450+
| PortworxVolume | &#x2713; | - | &#x2713; | - | - |
451+
| StorageOS | &#x2713; | - | - | - |
449452

450453
### Class
451454

@@ -792,6 +795,82 @@ spec:
792795
storage: 10Gi
793796
```
794797

798+
## Volume populators and data sources
799+
800+
{{< feature-state for_k8s_version="v1.22" state="alpha" >}}
801+
802+
{{< note >}}
803+
Kubernetes supports custom volume populators; this alpha feature was introduced
804+
in Kubernetes 1.18. Kubernetes 1.22 reimplemented the mechanism with a redesigned API.
805+
Check that you are reading the version of the Kubernetes documentation that matches your
806+
cluster. {{% version-check %}}
807+
To use custom volume populators, you must enable the `AnyVolumeDataSource`
808+
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) for
809+
the kube-apiserver and kube-controller-manager.
810+
{{< /note >}}
811+
812+
Volume populators take advantage of a PVC spec field called `dataSourceRef`. Unlike the
813+
`dataSource` field, which can only contain either a reference to another PersistentVolumeClaim
814+
or to a VolumeSnapshot, the `dataSourceRef` field can contain a reference to any object in the
815+
same namespace, except for core objects other than PVCs. For clusters that have the feature
816+
gate enabled, use of the `dataSourceRef` is preferred over `dataSource`.
817+
818+
## Data source references
819+
820+
The `dataSourceRef` field behaves almost the same as the `dataSource` field. If either one is
821+
specified while the other is not, the API server will give both fields the same value. Neither
822+
field can be changed after creation, and attempting to specify different values for the two
823+
fields will result in a validation error. Therefore the two fields will always have the same
824+
contents.
825+
826+
There are two differences between the `dataSourceRef` field and the `dataSource` field that
827+
users should be aware of:
828+
* The `dataSource` field ignores invalid values (as if the field was blank) while the
829+
`dataSourceRef` field never ignores values and will cause an error if an invalid value is
830+
used. Invalid values are any core object (objects with no apiGroup) except for PVCs.
831+
* The `dataSourceRef` field may contain different types of objects, while the `dataSource` field
832+
only allows PVCs and VolumeSnapshots.
833+
834+
Users should always use `dataSourceRef` on clusters that have the feature gate enabled, and
835+
fall back to `dataSource` on clusters that do not. It is not necessary to look at both fields
836+
under any circumstance. The duplicated values with slightly different semantics exist only for
837+
backwards compatibility. In particular, a mixture of older and newer controllers are able to
838+
interoperate because the fields are the same.
839+
840+
### Using volume populators
841+
842+
Volume populators are {{< glossary_tooltip text="controllers" term_id="controller" >}} that can
843+
create non-empty volumes, where the contents of the volume are determined by a Custom Resource.
844+
Users create a populated volume by referring to a Custom Resource using the `dataSourceRef` field:
845+
846+
```yaml
847+
apiVersion: v1
848+
kind: PersistentVolumeClaim
849+
metadata:
850+
name: populated-pvc
851+
spec:
852+
dataSourceRef:
853+
name: example-name
854+
kind: ExampleDataSource
855+
apiGroup: example.storage.k8s.io
856+
accessModes:
857+
- ReadWriteOnce
858+
resources:
859+
requests:
860+
storage: 10Gi
861+
```
862+
863+
Because volume populators are external components, attempts to create a PVC that uses one
864+
can fail if not all the correct components are installed. External controllers should generate
865+
events on the PVC to provide feedback on the status of the creation, including warnings if
866+
the PVC cannot be created due to some missing component.
867+
868+
You can install the alpha [volume data source validator](https://github.com/kubernetes-csi/volume-data-source-validator)
869+
controller into your cluster. That controller generates warning Events on a PVC in the case that no populator
870+
is registered to handle that kind of data source. When a suitable populator is installed for a PVC, it's the
871+
responsibility of that populator controller to report Events that relate to volume creation and issues during
872+
the process.
873+
795874
## Writing Portable Configuration
796875

797876
If you're writing configuration templates or examples that run on a wide range of clusters

content/en/docs/reference/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ configure kubernetes components or tools. Most of these APIs are not exposed
7171
by the API server in a RESTful way though they are essential for a user or an
7272
operator to use or manage a cluster.
7373

74+
* [kube-apiserver configuration (v1alpha1)](/docs/reference/config-api/apiserver-config.v1alpha1/)
7475
* [kubelet configuration (v1beta1)](/docs/reference/config-api/kubelet-config.v1beta1/)
7576
* [kube-scheduler configuration (v1beta1)](/docs/reference/config-api/kube-scheduler-config.v1beta1/)
7677
* [kube-scheduler configuration (v1beta2)](/docs/reference/config-api/kube-scheduler-config.v1beta2/)

content/en/docs/reference/command-line-tools-reference/feature-gates.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ different Kubernetes components.
471471
| `WatchBookmark` | `true` | GA | 1.17 | - |
472472
| `WindowsEndpointSliceProxying` | `false` | Alpha | 1.19 | 1.20 |
473473
| `WindowsEndpointSliceProxying` | `true` | Beta | 1.21 | 1.21 |
474-
| `WindowsEndpointSliceProxying` | `true` | GA | 1.22 | - |
474+
| `WindowsEndpointSliceProxying` | `true` | GA | 1.22| - |
475475
| `WindowsGMSA` | `false` | Alpha | 1.14 | 1.15 |
476476
| `WindowsGMSA` | `true` | Beta | 1.16 | 1.17 |
477477
| `WindowsGMSA` | `true` | GA | 1.18 | - |

0 commit comments

Comments
 (0)