Clean up a task: kubelet-config-file
parent
e1ca4c8a46
commit
9647701853
|
|
@ -38,6 +38,7 @@ The configuration file must be a JSON or YAML representation of the parameters
|
|||
in this struct. Make sure the kubelet has read permissions on the file.
|
||||
|
||||
Here is an example of what this file might look like:
|
||||
|
||||
```yaml
|
||||
apiVersion: kubelet.config.k8s.io/v1beta1
|
||||
kind: KubeletConfiguration
|
||||
|
|
@ -54,9 +55,10 @@ evictionHard:
|
|||
In this example, the kubelet is configured with the following settings:
|
||||
|
||||
1. `address`: The kubelet will serve on IP address `192.168.0.8`.
|
||||
2. `port`: The kubelet will serve on port `20250`.
|
||||
3. `serializeImagePulls`: Image pulls will be done in parallel.
|
||||
4. `evictionHard`: The kubelet will evict Pods under one of the following conditions:
|
||||
1. `port`: The kubelet will serve on port `20250`.
|
||||
1. `serializeImagePulls`: Image pulls will be done in parallel.
|
||||
1. `evictionHard`: The kubelet will evict Pods under one of the following conditions:
|
||||
|
||||
- When the node's available memory drops below 100MiB.
|
||||
- When the node's main filesystem's available space is less than 10%.
|
||||
- When the image filesystem's available space is less than 15%.
|
||||
|
|
@ -119,10 +121,9 @@ stored internally in the kubelet.
|
|||
This offers you flexibility in how you manage and combine kubelet configuration that comes from different sources.
|
||||
However, it's important to note that the behavior varies based on the data type of the configuration fields.
|
||||
|
||||
Different data types in the kubelet configuration structure merge differently.
|
||||
See the [reference
|
||||
document](/docs/reference/node/kubelet-config-directory-merging.md) for more
|
||||
information.
|
||||
Different data types in the kubelet configuration structure merge differently. See the
|
||||
[reference document](/docs/reference/node/kubelet-config-directory-merging.md)
|
||||
for more information.
|
||||
|
||||
### Kubelet configuration merging order
|
||||
|
||||
|
|
@ -135,8 +136,9 @@ On startup, the kubelet merges configuration from:
|
|||
|
||||
{{< note >}}
|
||||
The config drop-in dir mechanism for the kubelet is similar but different from how the `kubeadm` tool allows you to patch configuration.
|
||||
The `kubeadm` tool uses a specific [patching strategy](/docs/setup/production-environment/tools/kubeadm/control-plane-flags/#patches) for its configuration,
|
||||
whereas the only patch strategy for kubelet configuration drop-in files is `replace`. The kubelet determines the order of merges based on sorting the **suffixes** alphanumerically,
|
||||
The `kubeadm` tool uses a specific [patching strategy](/docs/setup/production-environment/tools/kubeadm/control-plane-flags/#patches)
|
||||
for its configuration, whereas the only patch strategy for kubelet configuration drop-in files is `replace`.
|
||||
The kubelet determines the order of merges based on sorting the **suffixes** alphanumerically,
|
||||
and replaces every field present in a higher priority file.
|
||||
{{< /note >}}
|
||||
|
||||
|
|
@ -153,18 +155,18 @@ kubectl proxy
|
|||
|
||||
Which gives output like:
|
||||
|
||||
```bash
|
||||
```none
|
||||
Starting to serve on 127.0.0.1:8001
|
||||
|
||||
```
|
||||
2. Open another terminal window and use `curl` to fetch the kubelet configuration.
|
||||
|
||||
1. Open another terminal window and use `curl` to fetch the kubelet configuration.
|
||||
Replace `<node-name>` with the actual name of your node:
|
||||
|
||||
```bash
|
||||
curl -X GET http://127.0.0.1:8001/api/v1/nodes/<node-name>/proxy/configz | jq .
|
||||
```
|
||||
|
||||
```bash
|
||||
```json
|
||||
{
|
||||
"kubeletconfig": {
|
||||
"enableServer": true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue