v.22.7Improvement

Handling SIGTERM Signals in Kubernetes

Handling SIGTERM signals from k8s. #39130 (Timur Solodovnikov).
ClickHouse now handles SIGTERM signals sent by Kubernetes, enabling graceful shutdown of ClickHouse servers in Kubernetes environments.

Why it matters

This feature addresses the need for ClickHouse to properly respond to SIGTERM signals from Kubernetes, allowing the server to safely terminate ongoing operations and clean up resources before shutting down. It improves stability and reliability when deploying ClickHouse in Kubernetes clusters.

How to use it

When running ClickHouse in a Kubernetes environment, the server automatically listens for SIGTERM signals. No additional configuration is required; Kubernetes will send SIGTERM during pod termination, and ClickHouse will handle it gracefully.