Skip to content

Commit 7101158

Browse files
authored
Merge pull request #26590 from tengqm/kubelet-config
Document kubelet config format
2 parents 029d2f6 + 79845b0 commit 7101158

File tree

14 files changed

+3248
-117
lines changed

14 files changed

+3248
-117
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ When a ConfigMap currently consumed in a volume is updated, projected keys are e
224224
The kubelet checks whether the mounted ConfigMap is fresh on every periodic sync.
225225
However, the kubelet uses its local cache for getting the current value of the ConfigMap.
226226
The type of the cache is configurable using the `ConfigMapAndSecretChangeDetectionStrategy` field in
227-
the [KubeletConfiguration struct](https://github.com/kubernetes/kubernetes/blob/{{< param "docsbranch" >}}/staging/src/k8s.io/kubelet/config/v1beta1/types.go).
227+
the [KubeletConfiguration struct](/docs/reference/config-api/kubelet-config.v1beta1/)).
228228
A ConfigMap can be either propagated by watch (default), ttl-based, or by redirecting
229229
all requests directly to the API server.
230230
As a result, the total delay from the moment when the ConfigMap is updated to the moment
@@ -233,6 +233,7 @@ propagation delay, where the cache propagation delay depends on the chosen cache
233233
(it equals to watch propagation delay, ttl of cache, or zero correspondingly).
234234

235235
ConfigMaps consumed as environment variables are not updated automatically and require a pod restart.
236+
236237
## Immutable ConfigMaps {#configmap-immutable}
237238

238239
{{< feature-state for_k8s_version="v1.19" state="beta" >}}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ allowed to use more of that resource than the limit you set. The kubelet also re
2121
at least the _request_ amount of that system resource specifically for that container
2222
to use.
2323

24-
25-
26-
2724
<!-- body -->
2825

2926
## Requests and limits
@@ -442,12 +439,15 @@ If you want to use project quotas, you should:
442439

443440
* Enable the `LocalStorageCapacityIsolationFSQuotaMonitoring=true`
444441
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/)
445-
in the kubelet configuration.
442+
using the `featureGates` field in the
443+
[kubelet configuration](/docs/reference/config-api/kubelet-config.v1beta1/)
444+
or the `--feature-gates` command line flag.
446445

447446
* Ensure that the root filesystem (or optional runtime filesystem)
448447
has project quotas enabled. All XFS filesystems support project quotas.
449448
For ext4 filesystems, you need to enable the project quota tracking feature
450449
while the filesystem is not mounted.
450+
451451
```bash
452452
# For ext4, with /dev/block-device not mounted
453453
sudo tune2fs -O project -Q prjquota /dev/block-device

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -668,7 +668,7 @@ When a secret currently consumed in a volume is updated, projected keys are even
668668
The kubelet checks whether the mounted secret is fresh on every periodic sync.
669669
However, the kubelet uses its local cache for getting the current value of the Secret.
670670
The type of the cache is configurable using the `ConfigMapAndSecretChangeDetectionStrategy` field in
671-
the [KubeletConfiguration struct](https://github.com/kubernetes/kubernetes/blob/{{< param "docsbranch" >}}/staging/src/k8s.io/kubelet/config/v1beta1/types.go).
671+
the [KubeletConfiguration struct](/docs/reference/config-api/kubelet-config.v1beta1/).
672672
A Secret can be either propagated by watch (default), ttl-based, or by redirecting
673673
all requests directly to the API server.
674674
As a result, the total delay from the moment when the Secret is updated to the moment
@@ -760,8 +760,8 @@ data has the following advantages:
760760
- improves performance of your cluster by significantly reducing load on kube-apiserver, by
761761
closing watches for secrets marked as immutable.
762762

763-
This feature is controlled by the `ImmutableEphemeralVolumes` [feature
764-
gate](/docs/reference/command-line-tools-reference/feature-gates/),
763+
This feature is controlled by the `ImmutableEphemeralVolumes`
764+
[feature gate](/docs/reference/command-line-tools-reference/feature-gates/),
765765
which is enabled by default since v1.19. You can create an immutable
766766
Secret by setting the `immutable` field to `true`. For example,
767767
```yaml
@@ -865,6 +865,7 @@ start until all the Pod's volumes are mounted.
865865
### Use-Case: As container environment variables
866866

867867
Create a secret
868+
868869
```yaml
869870
apiVersion: v1
870871
kind: Secret
@@ -877,6 +878,7 @@ data:
877878
```
878879

879880
Create the Secret:
881+
880882
```shell
881883
kubectl apply -f mysecret.yaml
882884
```
@@ -992,7 +994,7 @@ For example, if your actual password is `S!B\*d$zDsb=`, you should execute the c
992994
kubectl create secret generic dev-db-secret --from-literal=username=devuser --from-literal=password='S!B\*d$zDsb='
993995
```
994996

995-
You do not need to escape special characters in passwords from files (`--from-file`).
997+
You do not need to escape special characters in passwords from files (`--from-file`).
996998
{{< /note >}}
997999

9981000
Now make the Pods:
@@ -1173,14 +1175,12 @@ privileged, system-level components.
11731175

11741176
Applications that need to access the Secret API should perform `get` requests on
11751177
the secrets they need. This lets administrators restrict access to all secrets
1176-
while [white-listing access to individual instances](
1177-
/docs/reference/access-authn-authz/rbac/#referring-to-resources) that
1178+
while [white-listing access to individual instances](/docs/reference/access-authn-authz/rbac/#referring-to-resources) that
11781179
the app needs.
11791180

11801181
For improved performance over a looping `get`, clients can design resources that
11811182
reference a secret then `watch` the resource, re-requesting the secret when the
1182-
reference changes. Additionally, a ["bulk watch" API](
1183-
https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/bulk_watch.md)
1183+
reference changes. Additionally, a ["bulk watch" API](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/api-machinery/bulk_watch.md)
11841184
to let clients `watch` individual resources has also been proposed, and will likely
11851185
be available in future releases of Kubernetes.
11861186

content/en/docs/reference/_index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ client libraries:
5151

5252
## Components
5353

54-
* [kubelet](/docs/reference/command-line-tools-reference/kubelet/) - The primary *node agent* that runs on each node. The kubelet takes a set of PodSpecs and ensures that the described containers are running and healthy.
54+
* [kubelet](/docs/reference/command-line-tools-reference/kubelet/) - The
55+
primary agent that runs on each node. The kubelet takes a set of PodSpecs
56+
and ensures that the described containers are running and healthy.
5557
* [kube-apiserver](/docs/reference/command-line-tools-reference/kube-apiserver/) - REST API that validates and configures data for API objects such as pods, services, replication controllers.
5658
* [kube-controller-manager](/docs/reference/command-line-tools-reference/kube-controller-manager/) - Daemon that embeds the core control loops shipped with Kubernetes.
5759
* [kube-proxy](/docs/reference/command-line-tools-reference/kube-proxy/) - Can
@@ -66,6 +68,10 @@ client libraries:
6668

6769
* [kube-proxy configuration (v1alpha1)](/docs/reference/config-api/kube-proxy-config.v1alpha1/)
6870

71+
## Config APIs
72+
73+
* [kubelet config (v1beta1)](/docs/reference/config-api/kubelet-config.v1beta1/)
74+
6975
## Design Docs
7076

7177
An archive of the design docs for Kubernetes functionality. Good starting points are

0 commit comments

Comments
 (0)