diff --git a/content/en/docs/concepts/cluster-administration/node-shutdown.md b/content/en/docs/concepts/cluster-administration/node-shutdown.md index 99f5b10790..f3a3711238 100644 --- a/content/en/docs/concepts/cluster-administration/node-shutdown.md +++ b/content/en/docs/concepts/cluster-administration/node-shutdown.md @@ -265,6 +265,28 @@ via the [Non-Graceful Node Shutdown](#non-graceful-node-shutdown) procedure ment {{< /note >}} +## Windows Graceful node shutdown {#windows-graceful-node-shutdown} + +{{< feature-state feature_gate_name="WindowsGracefulNodeShutdown" >}} + +The Windows graceful node shutdown feature depends on kubelet running as a Windows service, +it will then have a registered [service control handler](https://learn.microsoft.com/en-us/windows/win32/services/service-control-handler-function) +to delay the presshutdown event with a given duration. + +Windows graceful node shutdown is controlled with the `WindowsGracefulNodeShutdown` +[feature gate](/docs/reference/command-line-tools-reference/feature-gates/) +which is introduced in 1.32 as an alpha feature. + +Windows graceful node shutdown can not be cancelled. + +If Kubelet is not running as a Windows service, it will not be able to set and monitor +the [Preshutdown](https://learn.microsoft.com/en-us/windows/win32/api/winsvc/ns-winsvc-service_preshutdown_info) event, +the node will have to go through the [Non-Graceful Node Shutdown](#non-graceful-node-shutdown) procedure mentioned above. + +In the case where the Windows graceful node shutdown feature is enabled, but the kubelet is not +running as a Windows service, the kubelet will continue running instead of failing. However, +it will log an error indicating that it needs to be run as a Windows service. + ## {{% heading "whatsnext" %}} Learn more about the following: diff --git a/content/en/docs/reference/command-line-tools-reference/feature-gates/windows-graceful-node-shutdown.md b/content/en/docs/reference/command-line-tools-reference/feature-gates/windows-graceful-node-shutdown.md new file mode 100644 index 0000000000..278b5926dd --- /dev/null +++ b/content/en/docs/reference/command-line-tools-reference/feature-gates/windows-graceful-node-shutdown.md @@ -0,0 +1,18 @@ +--- +title: WindowsGracefulNodeShutdown +content_type: feature_gate +_build: + list: never + render: false + +stages: + - stage: alpha + defaultValue: false + fromVersion: "1.32" + +--- +Enables support for windows node graceful shutdown in kubelet. +During a system shutdown, kubelet will attempt to detect the shutdown event +and gracefully terminate pods running on the node. See +[Graceful Node Shutdown](/docs/concepts/architecture/nodes/#graceful-node-shutdown) +for more details.