The module lifecycle stage: Preview
The module has requirements for installation
Clickhouse
The Clickhouse namespaced custom resource describes a ClickHouse instance
and is the source of truth for its desired state in a user namespace.
clickhouseClassName
Name of the ClickhouseClass used to validate the instance configuration.
A Clickhouse resource cannot be deployed without an existing ClickhouseClass.
spec:
clickhouseClassName: defaultinstance
Section that describes compute and storage resources for the ClickHouse instance. Values must match a sizing policy of the selected class.
spec:
instance:
memory:
size: 4Gi
cpu:
cores: 1
coreFraction: 50%
persistentVolumeClaim:
size: 8Gi
storageClassName: defaultTLS
The spec.tls section configures server-side TLS for ClickHouse.
When TLS is enabled, unencrypted ports are disabled and clients connect over HTTPS (8443) or secure TCP (9440).
Supported modes:
CertManager— the operator issues a certificate through cert-manager. Specify eitherclusterIssuerNameorissuerNameinspec.tls.certManager.CustomCertificate— use existing Secrets withtls.crt/tls.keyandca.crt. Setspec.tls.customCertificate.serverTLSSecretandspec.tls.customCertificate.serverCASecret.
spec:
tls:
mode: CertManager
certManager:
clusterIssuerName: selfsignedIf spec.tls is omitted, ClickHouse listens on HTTP port 8123 and TCP port 9000 without encryption.
Supported ClickHouse versions
The module supports only ClickHouse version 26.3.12.3-lts.
ClickHouse container images are based on the distroless architecture.
Status
The Clickhouse resource status reflects the state of the deployed service.
The conditions field shows whether configuration is valid and the instance is ready.
Significant condition types:
LastValidConfigurationApplied— whether the last valid configuration was applied at least once.ConfigurationValid— whether the configuration passed all validations of the associatedClickhouseClass.ScaledToLastValidConfiguration— whether the number of running replicas matches the specified configuration.Available— whether enough replicas are running and accepting connections.
conditions:
- lastTransitionTime: '2025-09-22T23:20:36Z'
observedGeneration: 2
status: 'True'
type: Available
- lastTransitionTime: '2025-09-22T14:38:04Z'
observedGeneration: 2
status: 'True'
type: ConfigurationValid
- lastTransitionTime: '2025-09-22T14:38:47Z'
observedGeneration: 2
status: 'True'
type: LastValidConfigurationApplied
- lastTransitionTime: '2025-09-22T23:20:36Z'
observedGeneration: 2
status: 'True'
type: ScaledToLastValidConfigurationA False status indicates a problem or incomplete reconciliation.
In this case, check reason and message for details.
- lastTransitionTime: '2025-09-23T14:53:33Z'
message: Syncing
observedGeneration: 1
reason: Syncing
status: 'False'
type: LastValidConfigurationApplied
- lastTransitionTime: '2025-09-23T14:54:58Z'
message: Not all the instances are running still waiting for 1 to become ready
observedGeneration: 1
reason: ScalingInProgress
status: 'False'
type: ScaledToLastValidConfigurationUsage examples
Basic usage
Choose the memory-to-storage ratio according to the ClickHouse sizing recommendations.
- Create a
Clickhouseresource in thedefaultnamespace:
d8 k apply -f managed-services_v1alpha1_clickhouse.yamlapiVersion: managed-services.deckhouse.io/v1alpha1
kind: Clickhouse
metadata:
name: clickhouse-sample
spec:
clickhouseClassName: default
instance:
memory:
size: "4Gi"
cpu:
cores: 1
coreFraction: "50%"
persistentVolumeClaim:
size: "8Gi"- Wait until the instance is ready and all conditions are
True:
d8 k get clickhouse clickhouse-sample -o wide -w- Connect with
clickhouse-clientthrough thed8ms-ch-clickhouse-sampleservice:
clickhouse-client -h d8ms-ch-clickhouse-sample