Skip to content

Commit f287ed4

Browse files
authored
Merge pull request #39904 from saschagrunert/dev-1.27-otel
[KEP-2731] Add docs for Kubelet OpenTelemetry tracing graduation
2 parents e1c71e3 + 53641df commit f287ed4

File tree

2 files changed

+19
-6
lines changed

2 files changed

+19
-6
lines changed

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

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ For more information about the `TracingConfiguration` struct, see
7676

7777
### kubelet traces
7878

79-
{{< feature-state for_k8s_version="v1.25" state="alpha" >}}
79+
{{< feature-state for_k8s_version="v1.27" state="beta" >}}
8080

8181
The kubelet CRI interface and authenticated http servers are instrumented to generate
8282
trace spans. As with the apiserver, the endpoint and sampling rate are configurable.
@@ -86,10 +86,7 @@ Enabled without a configured endpoint, the default OpenTelemetry Collector recei
8686

8787
#### Enabling tracing in the kubelet
8888

89-
To enable tracing, enable the `KubeletTracing`
90-
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
91-
on the kubelet. Also, provide the kubelet with a
92-
[tracing configuration](https://github.com/kubernetes/component-base/blob/release-1.25/tracing/api/v1/types.go).
89+
To enable tracing, apply the [tracing configuration](https://github.com/kubernetes/component-base/blob/release-1.27/tracing/api/v1/types.go).
9390
This is an example snippet of a kubelet config that records spans for 1 in 10000 requests, and uses the default OpenTelemetry endpoint:
9491

9592
```yaml
@@ -103,6 +100,21 @@ tracing:
103100
samplingRatePerMillion: 100
104101
```
105102

103+
If the `samplingRatePerMillion` is set to one million (`1000000`), then every
104+
span will be sent to the exporter.
105+
106+
The kubelet in Kubernetes v{{< skew currentVersion >}} collects spans from
107+
the garbage collection, pod synchronization routine as well as every gRPC
108+
method. Connected container runtimes like CRI-O and containerd can link the
109+
traces to their exported spans to provide additional context of information.
110+
111+
Please note that exporting spans always comes with a small performance overhead
112+
on the networking and CPU side, depending on the overall configuration of the
113+
system. If there is any issue like that in a cluster which is running with
114+
tracing enabled, then mitigate the problem by either reducing the
115+
`samplingRatePerMillion` or disabling tracing completely by removing the
116+
configuration.
117+
106118
## Stability
107119

108120
Tracing instrumentation is still under active development, and may change

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ For a reference to old feature gates that are removed, please refer to
131131
| `KubeletPodResourcesGetAllocatable` | `false` | Alpha | 1.21 | 1.22 |
132132
| `KubeletPodResourcesGetAllocatable` | `true` | Beta | 1.23 | |
133133
| `KubeletPodResourcesDynamicResources` | `false` | Alpha | 1.27 | |
134-
| `KubeletTracing` | `false` | Alpha | 1.25 | |
134+
| `KubeletTracing` | `false` | Alpha | 1.25 | 1.26 |
135+
| `KubeletTracing` | `true` | Beta | 1.27 | |
135136
| `LegacyServiceAccountTokenTracking` | `false` | Alpha | 1.26 | 1.26 |
136137
| `LegacyServiceAccountTokenTracking` | `true` | Beta | 1.27 | |
137138
| `LocalStorageCapacityIsolationFSQuotaMonitoring` | `false` | Alpha | 1.15 | - |

0 commit comments

Comments
 (0)