You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have enabled the `GracefulNodeShutdown`[feature gate](/docs/reference/command-line-tools-reference/feature-gates/), then the kubelet attempts to detect the node system shutdown and terminates pods running on the node.
338
+
Kubelet ensures that pods follow the normal [pod termination process](/docs/concepts/workloads/pods/pod-lifecycle/#pod-termination) during the node shutdown.
339
+
340
+
When the `GracefulNodeShutdown` feature gate is enabled, kubelet uses [systemd inhibitor locks](https://www.freedesktop.org/wiki/Software/systemd/inhibit/) to delay the node shutdown with a given duration. During a shutdown kubelet terminates pods in two phases:
341
+
342
+
1. Terminate regular pods running on the node.
343
+
2. Terminate [critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical) running on the node.
344
+
345
+
Graceful Node Shutdown feature is configured with two [`KubeletConfiguration`](/docs/tasks/administer-cluster/kubelet-config-file/) options:
346
+
*`ShutdownGracePeriod`:
347
+
* Specifies the total duration that the node should delay the shutdown by. This is the total grace period for pod termination for both regular and [critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical).
348
+
*`ShutdownGracePeriodCriticalPods`:
349
+
* Specifies the duration used to terminate [critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical) during a node shutdown. This should be less than `ShutdownGracePeriod`.
350
+
351
+
For example, if `ShutdownGracePeriod=30s`, and `ShutdownGracePeriodCriticalPods=10s`, kubelet will delay the node shutdown by 30 seconds. During the shutdown, the first 20 (30-10) seconds would be reserved for gracefully terminating normal pods, and the last 10 seconds would be reserved for terminating [critical pods](/docs/tasks/administer-cluster/guaranteed-scheduling-critical-addon-pods/#marking-pod-as-critical).
Log sanitization might incur significant computation overhead and therefore should not be enabled in production.
100
+
{{< /warning >}}
101
+
102
+
The `--experimental-logging-sanitization` flag enables the klog sanitization filter.
103
+
If enabled all log arguments are inspected for fields tagged as sensitive data (e.g. passwords, keys, tokens) and logging of these fields will be prevented.
104
+
105
+
List of components currently supporting log sanitization:
106
+
* kube-controller-manager
107
+
* kube-apiserver
108
+
* kube-scheduler
109
+
* kubelet
110
+
111
+
{{< note >}}
112
+
The Log sanitization filter does not prevent user workload logs from leaking sensitive data.
113
+
{{< /note >}}
114
+
94
115
### Log verbosity level
95
116
96
117
The `-v` flag controls log verbosity. Increasing the value increases the number of logged events. Decreasing the value decreases the number of logged events.
The scheduler exposes optional metrics that reports the requested resources and the desired limits of all running pods. These metrics can be used to build capacity planning dashboards, assess current or historical scheduling limits, quickly identify workloads that cannot schedule due to lack of resources, and compare actual usage to the pod's request.
138
+
139
+
The kube-scheduler identifies the resource [requests and limits](/docs/concepts/configuration/manage-resources-containers/) configured for each Pod; when either a request or limit is non-zero, the kube-scheduler reports a metrics timeseries. The time series is labelled by:
140
+
- namespace
141
+
- pod name
142
+
- the node where the pod is scheduled or an empty string if not yet scheduled
143
+
- priority
144
+
- the assigned scheduler for that pod
145
+
- the name of the resource (for example, `cpu`)
146
+
- the unit of the resource if known (for example, `cores`)
147
+
148
+
Once a pod reaches completion (has a `restartPolicy` of `Never` or `OnFailure` and is in the `Succeeded` or `Failed` pod phase, or has been deleted and all containers have a terminated state) the series is no longer reported since the scheduler is now free to schedule other pods to run. The two metrics are called `kube_pod_resource_request` and `kube_pod_resource_limit`.
149
+
150
+
The metrics are exposed at the HTTP endpoint `/metrics/resources` and require the same authorization as the `/metrics`
151
+
endpoint on the scheduler. You must use the `--show-hidden-metrics-for-version=1.20` flag to expose these alpha stability metrics.
152
+
153
+
132
154
## {{% heading "whatsnext" %}}
133
155
134
156
* Read about the [Prometheus text format](https://github.com/prometheus/docs/blob/master/content/docs/instrumenting/exposition_formats.md#text-based-format) for metrics
Copy file name to clipboardExpand all lines: content/en/docs/concepts/configuration/manage-resources-containers.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -600,6 +600,10 @@ spec:
600
600
example.com/foo: 1
601
601
```
602
602
603
+
## PID limiting
604
+
605
+
Process ID (PID) limits allow for the configuration of a kubelet to limit the number of PIDs that a given Pod can consume. See [Pid Limiting](/docs/concepts/policy/pid-limiting/) for information.
606
+
603
607
## Troubleshooting
604
608
605
609
### My Pods are pending with event message failedScheduling
Support for the "PodResources service" requires `KubeletPodResources`[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to be enabled. It is enabled by default starting with Kubernetes 1.15.
207
+
Support for the "PodResources service" requires `KubeletPodResources`[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to be enabled.
208
+
It is enabled by default starting with Kubernetes 1.15 and is v1 since Kubernetes 1.20.
208
209
209
210
## Device Plugin integration with the Topology Manager
0 commit comments