ClickHouse is an open-source, column-oriented database designed for high-performance analytical workloads. Its MergeTree storage engine supports configurable storage policies that determine where data is stored and how it moves between storage tiers.
Oracle Cloud Infrastructure (OCI) provides persistent block storage and scalable object storage that customers can integrate with ClickHouse to address different analytical workload requirements.
In this tutorial, we deploy ClickHouse on Oracle Kubernetes Engine (OKE) using the Altinity ClickHouse Operator and demonstrate three storage strategies.
- Scenario 1: OCI Block Volume-backed storage. Store and query analytical data using persistent block storage.
- Scenario 2: OCI Object Storage-backed storage. Store analytical datasets directly in Object Storage while retaining native ClickHouse SQL access.
- Scenario 3: Automated hot-to-cold storage tiering. Store recent data on Block Volume and automatically move historical data to Object Storage using native ClickHouse TTL rules, without changing how applications query the table.
Together, these scenarios demonstrate how ClickHouse storage policies can address different analytical workload and data lifecycle requirements. All three scenarios were successfully validated on Oracle Kubernetes Engine (OKE).
1. Solution Architecture
Each ClickHouse deployment consists of three independent shards distributed across three OKE worker nodes and managed by the Altinity ClickHouse Operator.
Each shard uses a dedicated 50 GiB OCI Block Volume for persistent storage and accesses a private OCI Object Storage bucket through the OCI S3 Compatibility API.

The ClickHouseInstallation resource defines the following cluster topology:
clusters:
- name: demo
layout:
shardsCount: 3
replicasCount: 1
Pod anti-affinity ensures that the ClickHouse pods are scheduled on separate worker nodes.
Each shard retains its local data, server state, and Object Storage metadata on persistent Block Volume storage. The local metadata maps ClickHouse data parts to their corresponding objects in Object Storage.
The shards operate independently, without replication or Distributed tables. Query results are aggregated by the client across the three shards.
2. Prerequisites
- OKE cluster: An existing Enhanced cluster with at least three worker nodes, OCI Block Volume CSI driver support, and sufficient quota and attachment capacity for three 50 GiB Block Volumes per deployment
- Client tools: OCI Cloud Shell with OCI CLI, kubectl, Bash 4 or later, jq, Git, curl, Python 3.8 or later, and standard Linux utilities.
- Object Storage: A private OCI Object Storage bucket using the Standard storage tier and a valid Customer Secret Key pair.
- Network connectivity: Access to the Kubernetes API, GitHub, container image registries, and the regional OCI Object Storage endpoint. Worker nodes must have appropriate DNS resolution and network connectivity.
- OCI IAM permissions: Appropriate permissions for OKE cluster access, Block Volume provisioning and attachment, and Object Storage operations. The OCI CLI identity must have permission to inspect the bucket and list objects. The identity associated with the Customer Secret Keys must have permission to list, read, create, overwrite, and delete objects.
- Kubernetes RBAC permissions: Permission to manage namespaces, Secrets, ConfigMaps, StorageClasses, and ClickHouseInstallation resources. Operator installation additionally requires permissions to manage CRDs, ClusterRoles, ClusterRoleBindings, and associated namespaced resources. Validation requires read access to Kubernetes resources and appropriate pods/exec and pods/portforward permissions.
Refer to the GitHub repository for implementation-specific requirements and the official OCI documentation in the References section for IAM and Kubernetes access control guidance.
Tested Environment
The storage scenarios were validated using Kubernetes v1.36.4, ClickHouse Server 25.8.33.6, and Altinity ClickHouse Operator 0.26.3.
3. Obtain the Deployment Repository
The GitHub repository contains the Kubernetes manifests, storage configurations, deployment scripts, SQL workloads, and validation utilities for all three scenarios.
In the OCI Console, navigate to your OKE cluster and select Access cluster to configure Kubernetes access from OCI Cloud Shell.
Clone the repository:
git clone https://github.com/Payalsharma2512/clickhouse-oke-object-storage.git
cd clickhouse-oke-object-storage
From the repository root, navigate to independent-storage for Scenarios 1 and 2 or automated-tiering for Scenario 3. Run the deployment and validation commands from the selected directory using the appropriate OKE cluster context.
4. Configure OCI Object Storage
Create a private OCI Object Storage bucket using the Standard storage tier.
Generate a Customer Secret Key pair under My Profile in the OCI Console or use an approved existing pair.
Create the Object Storage configuration file:
umask 077
cp oci/object-storage.env.example oci/object-storage.env
vi oci/object-storage.env
Configure the bucket endpoint, region, and Customer Secret Key pair:
OBJECT_STORAGE_ENDPOINT=https://<object-storage-namespace>.compat.objectstorage.<region>.oraclecloud.com/<bucket>/
OBJECT_STORAGE_REGION=<region>
OBJECT_STORAGE_ACCESS_KEY=<access-key>
OBJECT_STORAGE_SECRET_KEY=<secret-key>
The deployment script automatically allocates a dedicated Object Storage prefix and passes the endpoint and credentials to ClickHouse through a Kubernetes Secret.
Keep the credential file private and exclude active ClickHouse-managed objects from Object Storage expiration and archival rules.
Security Considerations
The demonstrations use the ClickHouse default user with an empty password.
The independent-storage implementation permits connections from clients with network access to its internal ClusterIP service. Use this configuration only in an isolated demonstration environment.
The automated-tiering implementation restricts the default user to loopback connections. Limit Kubernetes pod port-forward permissions to trusted users.
For production deployments, configure database authentication, appropriate TLS, restricted network access, and secure credential management.
5. Deploy and Verify ClickHouse on OKE
The Altinity ClickHouse Operator manages the ClickHouse deployment, including server configuration, pods, services, and persistent volume claims.
From the selected implementation directory, review the deployment plan:
bash scripts/deploy.sh plan
After reviewing the target environment and planned resources, deploy ClickHouse:
ALLOW_NEW_RESOURCES=yes bash scripts/deploy.sh apply
The deployment script creates the required Kubernetes resources, configures access to OCI Object Storage, and provisions three 50 GiB OCI Block Volumes.
Verify the deployment:
bash scripts/verify.sh
The read-only verification script checks ClickHouse pod health, worker placement, and persistent volume claims.
The following figures illustrate the provisioned Kubernetes and OCI storage resources.



The Block Volumes can also be verified in the OCI Console under Storage → Block Volumes.

6. Configure ClickHouse Storage
ClickHouse separates physical storage configuration from table-level storage policies. A disk defines a storage destination, while a storage policy determines which disks a table uses.
The architecture uses two ClickHouse disks:
| Disk | Storage destination |
| hot | OCI Block Volume |
| oci_object_storage | OCI Object Storage |
All three storage scenarios use these disk definitions. The deployment script configures the storage policies required for the selected scenario.
<clickhouse>
<storage_configuration>
<disks>
<hot>
<path>/var/lib/clickhouse/hot/data/</path>
<keep_free_space_bytes>1073741824</keep_free_space_bytes>
</hot>
<oci_object_storage>
<type>object_storage</type>
<object_storage_type>s3</object_storage_type>
<endpoint from_env="OBJECT_STORAGE_ENDPOINT"/>
<access_key_id from_env="OBJECT_STORAGE_ACCESS_KEY"/>
<secret_access_key from_env="OBJECT_STORAGE_SECRET_KEY"/>
<region from_env="OBJECT_STORAGE_REGION"/>
<metadata_type>local</metadata_type>
<metadata_path>/var/lib/clickhouse/hot/oci-object-storage-metadata/</metadata_path>
<skip_access_check>false</skip_access_check>
</oci_object_storage>
</disks>
</storage_configuration>
</clickhouse>
The three storage policies are:
| Storage policy | Purpose |
| hot_policy | Store data parts on OCI Block Volume. |
| oci_object_storage_policy | Store data parts directly in OCI Object Storage. |
| hot_cold_policy | Move eligible data parts from Block Volume to Object Storage. |
For Scenarios 1 and 2, verify the configured disks and storage policies from the independent-storage directory:
NAMESPACE=$(bash scripts/target.sh) || exit 1
POD=$(kubectl get pods -n "$NAMESPACE" \
-l clickhouse.altinity.com/chi=oke-hot-object-demo \
-o jsonpath='{.items[0].metadata.name}') || exit 1
kubectl exec -n "$NAMESPACE" "$POD" -c clickhouse -- \
clickhouse-client --readonly 2 --query "
SELECT policy_name, disks
FROM system.storage_policies
WHERE policy_name IN ('hot_policy', 'oci_object_storage_policy')
ORDER BY policy_name
FORMAT PrettyCompact"

If implementing automated storage tiering, please proceed directly to Scenario 3 after completing the common deployment steps.
Load Sample Data for Scenarios 1 and 2
The sample data can be loaded automatically using the provided script or manually using the SQL statements in the following sections.
To load both demonstration tables across all three shards and verify storage placement and payload retrieval, run:
bash scripts/rehearse.sh
Run this command only on a fresh demonstration installation, as it recreates the sample tables.
If you ran bash scripts/rehearse.sh, skip the manual CREATE and INSERT statements in Scenarios 1 and 2 and proceed directly to data verification.
For manual loading, use the loop below to open each of the three pods in turn. Run the SQL for both scenarios once per pod, then type exit to advance to the next pod.
For manual loading, connect to a ClickHouse pod:
NAMESPACE=$(bash scripts/target.sh) || exit 1
PODS=$(kubectl get pods -n "$NAMESPACE" \
-l clickhouse.altinity.com/chi=oke-hot-object-demo \
-o name) || exit 1
for POD in $PODS; do
printf '\nManual load target: %s\n' "$POD"
# Run the SQL for both scenarios once in this pod, then type exit.
kubectl exec -it -n "$NAMESPACE" "$POD" -c clickhouse -- \
clickhouse-client --max_threads 1 --max_insert_threads 1 \
--max_block_size 8192 --max_insert_block_size 8192 --multiquery
Done
Execute the manual table creation and insertion statements on each of the three shards, starting with absent demonstration tables. Exit the ClickHouse client before executing the Bash verification commands.
7. Scenario 1: ClickHouse Tables Backed by OCI Block Volume
This scenario demonstrates how to store analytical data on persistent OCI Block Volume storage.
The hot_policy storage policy directs ClickHouse data parts to the Block Volume-backed hot disk.
<hot_policy>
<volumes>
<hot>
<disk>hot</disk>
</hot>
</volumes>
</hot_policy>
Create the Block Volume-Backed Table
Create a MergeTree table using hot_policy:
CREATE DATABASE IF NOT EXISTS demo;
CREATE TABLE demo.events
(
event_time DateTime,
event_id UInt64,
batch UInt32,
payload String
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(event_time)
ORDER BY (event_time, event_id)
SETTINGS storage_policy = 'hot_policy';
Insert Data
Insert two batches of 100,000 rows per shard:
INSERT INTO demo.events
SELECT
toDateTime('2026-01-01 00:00:00')
+ toIntervalSecond(number % 86400),
number + (1 * 1000000000000),
1,
repeat(concat('batch-', toString(1), '-'), 16)
FROM numbers(100000);
INSERT INTO demo.events
SELECT
toDateTime('2026-01-01 00:00:00')
+ toIntervalSecond(number % 86400),
number + (2 * 1000000000000),
2,
repeat(concat('batch-', toString(2), '-'), 16)
FROM numbers(100000);
ClickHouse writes the resulting data parts to the OCI Block Volume associated with each shard.
Verify Data Placement
Query the ClickHouse system.parts table to identify the disk containing the active data parts and compare their row counts with the table row count.
NAMESPACE=$(bash scripts/target.sh) || exit 1
kubectl get pods -n "$NAMESPACE" \
-l clickhouse.altinity.com/chi=oke-hot-object-demo -o name |
xargs -r -I POD kubectl exec -n "$NAMESPACE" POD -c clickhouse -- \
clickhouse-client --readonly 2 --max_threads 1 --query "
SELECT hostName() AS pod,
(SELECT count() FROM demo.events) AS queried_rows,
disk_name,
sum(rows) AS active_part_rows
FROM system.parts
WHERE database = 'demo'
AND table = 'events'
AND active
GROUP BY disk_name
ORDER BY disk_name
FORMAT PrettyCompact"

The validation confirms that ClickHouse successfully stores and queries 600,000 rows across the three OCI Block Volume-backed shards.
8. Scenario 2: ClickHouse Tables Backed by OCI Object Storage
This scenario demonstrates how ClickHouse can store analytical data directly in OCI Object Storage while retaining standard SQL access.
The oci_object_storage_policy directs data parts to the Object Storage-backed disk.
<oci_object_storage_policy>
<volumes>
<main>
<disk>oci_object_storage</disk>
</main>
</volumes>
</oci_object_storage_policy>
Create the Object Storage-Backed Table
Create a MergeTree table using the Object Storage policy:
CREATE DATABASE IF NOT EXISTS demo;
CREATE TABLE demo.object_storage_events
(
event_time DateTime,
event_id UInt64,
payload String
)
ENGINE = MergeTree
PARTITION BY toYYYYMM(event_time)
ORDER BY (event_time, event_id)
SETTINGS storage_policy = 'oci_object_storage_policy';
Insert Data
Insert 10,000 rows per shard:
INSERT INTO demo.object_storage_events
SELECT
now(),
number,
repeat('object-storage-', 64)
FROM numbers(10000);
ClickHouse writes the resulting data parts to OCI Object Storage.
Verify Data Placement
Query system.parts to confirm that the active data parts reside on the oci_object_storage disk.
NAMESPACE=$(bash scripts/target.sh) || exit 1
kubectl get pods -n "$NAMESPACE" \
-l clickhouse.altinity.com/chi=oke-hot-object-demo -o name |
xargs -r -I POD kubectl exec -n "$NAMESPACE" POD -c clickhouse -- \
clickhouse-client --readonly 2 --max_threads 1 --query "
SELECT hostName() AS pod,
(SELECT count() FROM demo.object_storage_events) AS queried_rows,
disk_name,
sum(rows) AS active_part_rows
FROM system.parts
WHERE database = 'demo'
AND table = 'object_storage_events'
AND active
GROUP BY disk_name
ORDER BY disk_name
FORMAT PrettyCompact"

The validation confirms that ClickHouse successfully stores and queries 30,000 object-backed rows across the three shards.
The ClickHouse-managed objects can also be inspected in the OCI Console under the installation’s bucket prefix.
Retrieve the prefix:
kubectl get configmap clickhouse-storage-target \
-n "$(bash scripts/target.sh)" \
-o jsonpath='{.data.prefix}{"\n"}'

Individual database rows do not correspond directly to individual Object Storage objects. ClickHouse manages objects containing data-part files and uses persistent local metadata to locate them.
Verify Data Retrieval from Both Storage Destinations
Verify that ClickHouse can retrieve row counts and payload values from both tables:
NAMESPACE=$(bash scripts/target.sh) || exit 1
kubectl get pods -n "$NAMESPACE" \
-l clickhouse.altinity.com/chi=oke-hot-object-demo -o name |
xargs -r -I POD kubectl exec -n "$NAMESPACE" POD -c clickhouse -- \
clickhouse-client --readonly 2 --max_threads 1 --query "
SELECT hostName() AS pod,
'hot' AS storage,
count() AS total_rows,
countIf(length(payload) > 0) AS rows_with_payload
FROM demo.events
UNION ALL
SELECT hostName(),
'object',
count(),
countIf(length(payload) > 0)
FROM demo.object_storage_events
FORMAT PrettyCompact"

Run the end-to-end read-only validation from the independent-storage directory:
bash scripts/demo.sh

Scenarios 1 and 2 demonstrate how customers can select different storage destinations for individual ClickHouse tables within the same deployment.
9. Scenario 3: Automated Hot-to-Cold Storage Tiering
Analytical and observability workloads often require frequent access to recent data while retaining historical records for longer-term analysis.
ClickHouse supports automated storage tiering through combined storage policies and native Time to Live (TTL) rules. Recent data can reside on OCI Block Volume, while older data automatically moves to OCI Object Storage without changing how applications query the table.
Customers with existing Block Volume-backed tables can also adopt this approach by configuring a compatible combined storage policy and adding a movement TTL to the existing table. The combined policy must retain the existing volumes and disks. Existing data parts may require TTL materialization.
In this demonstration, we use a telemetry table containing synthetic application and infrastructure metrics to observe the complete data lifecycle.
If continuing from Scenario 2, switch to the automated-tiering implementation:
cd ../automated-tiering
If starting from the repository root, use cd automated-tiering instead.
Select the OKE context for your deployment. If you have already deployed and verified automated-tiering, continue to Insert Telemetry Data. For a new installation, follow the deployment instructions. If you plan to run all three scenarios together, deploy automated-tiering first so its operator can manage both implementations.
Configure the Combined Storage Policy
The hot_cold_policy in automated-tiering/k8s/clickhouse.yaml combines the two previously defined storage disks.
<hot_cold_policy>
<volumes>
<hot>
<disk>hot</disk>
</hot>
<cold>
<disk>oci_object_storage</disk>
<perform_ttl_move_on_insert>0</perform_ttl_move_on_insert>
</cold>
</volumes>
<move_factor>0</move_factor>
</hot_cold_policy>
The policy defines two storage tiers:
- Hot: OCI Block Volume, the initial destination for new data parts.
- Cold: OCI Object Storage, the destination for historical data parts.
The move_factor setting is set to zero to disable free-space-triggered movement. Setting perform_ttl_move_on_insert to zero allows eligible data to be written initially to the hot tier before background TTL movement occurs.
These settings allow us to observe TTL-based movement independently of other storage movement mechanisms.

Configure the Table and Movement TTL
The demonstration script creates the following MergeTree table on each shard:
CREATE DATABASE IF NOT EXISTS demo;
CREATE TABLE IF NOT EXISTS demo.telemetry
(
run_id UInt64,
cohort UInt8,
event_time DateTime('UTC'),
event_id UInt64,
service_name LowCardinality(String),
host_id String,
metric_name LowCardinality(String),
metric_value Float64,
severity LowCardinality(String),
payload String
)
ENGINE = MergeTree
PARTITION BY run_id * 2 + cohort
ORDER BY (service_name, event_time, event_id)
TTL event_time + INTERVAL 5 MINUTE TO VOLUME 'cold'
SETTINGS storage_policy = 'hot_cold_policy';
The movement TTL makes a data part eligible for movement to the cold volume once all its rows reach five minutes of age.
ClickHouse performs this movement asynchronously in the background.
The partition key separates each demonstration run and data batch, allowing recent and historical parts to age independently.
The five-minute TTL is selected to demonstrate automatic movement within a single session. Production TTL intervals and partitioning strategies should reflect workload requirements.
Insert Telemetry Data
Run the automated-tiering demonstration:
set -o pipefail
export LOG="$HOME/tiering-demo.log"
bash scripts/demo.sh | tee "$LOG"
Unlike the read-only demonstration in the independent-storage directory, this script inserts new telemetry records and observes automatic storage movement.
The script creates the table if required, assigns a unique run identifier, and inserts synthetic telemetry across all three shards.
The following SQL illustrates the insertion performed by the script. It does not need to be executed separately.
INSERT INTO demo.telemetry
SELECT
{run:UInt64},
{cohort:UInt8},
now(),
{shard:UInt64} * 1000000
+ {cohort:UInt64} * 100000
+ number AS id,
['api-gateway',
'payment-service',
'checkout-service',
'inventory-service',
'frontend'][1 + number % 5],
concat(
'host-',
toString({shard:UInt64}),
'-',
toString(number % 16)
),
['request_latency_ms',
'cpu_utilization_pct',
'memory_utilization_pct',
'request_count'][1 + number % 4],
multiIf(
number % 4 = 0, (number % 220) + 0.5,
number % 4 = 3, (number % 300) + 1.,
(number % 100) + 0.
),
if(number % 23 = 0, 'warn', 'info'),
concat(
'synthetic-event-',
toString(id),
'-',
repeat('telemetry', 8)
)
FROM numbers(10000);
The first batch inserts 10,000 records per shard, identified by cohort=1. All 30,000 records are initially stored on OCI Block Volume.
Observe Automatic Data Movement
The script queries system.parts to monitor the storage location of the historical batch:
SELECT
disk_name,
sum(rows) AS rows
FROM system.parts
WHERE database = 'demo'
AND table = 'telemetry'
AND active
AND partition_id = {partition:String}
GROUP BY disk_name;
The historical partition identifier is calculated as run_id * 2 + 1.
Once the data parts become eligible for movement, ClickHouse automatically transfers them to OCI Object Storage.
The movement events can be inspected through system.part_log:
SELECT
event_time,
part_name,
disk_name,
rows
FROM system.part_log
WHERE database = 'demo'
AND table = 'telemetry'
AND partition_id = {partition:String}
AND event_type = 'MovePart'
ORDER BY event_time DESC
LIMIT 3;

ClickHouse manages the movement internally. No application-managed copying or external data migration process is required.
Verify Recent and Historical Data Placement
After the first batch moves to Object Storage and passes its integrity checks, the script inserts another 10,000 records per shard, identified by cohort=0.
Both batches belong to the same demo.telemetry table.
The script verifies their storage locations using the corresponding partition identifiers:
SELECT
partition_id,
disk_name,
sum(rows) AS rows
FROM system.parts
WHERE database = 'demo'
AND table = 'telemetry'
AND active
AND partition_id IN ({historical:String}, {recent:String})
GROUP BY partition_id, disk_name
ORDER BY partition_id DESC;
The following storage placement was observed during validation:
| Shard | Recent rows on Block Volume | Historical rows on Object Storage |
| Shard 1 | 10,000 | 10,000 |
| Shard 2 | 10,000 | 10,000 |
| Shard 3 | 10,000 | 10,000 |
| Total | 30,000 | 30,000 |

The recent batch is subject to the same movement TTL and becomes eligible for movement later. The results capture the period during which both storage tiers contain active data parts.
Query Data Across Both Storage Tiers
Applications continue querying demo.telemetry without specifying whether the underlying data resides on Block Volume or Object Storage.
The following query retrieves sample records from each batch:
SELECT
event_time,
event_id,
service_name,
host_id,
metric_name,
metric_value,
severity
FROM demo.telemetry
WHERE run_id = {run:UInt64}
AND cohort = {cohort:UInt8}
ORDER BY event_id
LIMIT 2;
The script supplies the run identifier and batch identifier when executing the query on each shard.
The following sample records were returned from shard 1:
| Field | Historical record | Recent record |
| Event ID | 1100000 | 1000000 |
| Service | api-gateway | api-gateway |
| Host | host-1-0 | host-1-0 |
| Metric | request_latency_ms | request_latency_ms |
| Value | 0.5 | 0.5 |
| Severity | warn | warn |

Aggregate Data Across Both Storage Tiers
ClickHouse can also execute analytical queries across the recent and historical data.
For example, aggregate telemetry records by service:
SELECT
service_name,
count() AS n
FROM demo.telemetry
WHERE run_id = {run:UInt64}
GROUP BY service_name;
Aggregate telemetry records by metric:
SELECT
metric_name,
count() AS n
FROM demo.telemetry
WHERE run_id = {run:UInt64}
GROUP BY metric_name;
The client combines the query results from the three independent shards.
The validation returned 12,000 records for each of the five services and 15,000 records for each of the four metric types, accounting for all 60,000 telemetry records.
Verify Data Integrity
To verify that historical data remains intact after movement, the script compares row counts, distinct event identifiers, nonempty payload counts, and checksums before and after the transition to Object Storage.
SELECT
count() AS rows,
uniqExact(event_id) AS ids,
countIf(length(payload) > 0) AS payloads,
sum(cityHash64(tuple(*))) AS checksum
FROM demo.telemetry
WHERE run_id = {run:UInt64}
AND cohort = {cohort:UInt8};
The historical checksums matched across all three shards:
| Shard | Checksum on Block Volume | Checksum on Object Storage |
| Shard 1 | 8777004512808054402 | 8777004512808054402 |
| Shard 2 | 7129495065173628694 | 7129495065173628694 |
| Shard 3 | 3202747454594178514 | 3202747454594178514 |
All three historical checksums matched before and after automatic movement to OCI Object Storage. Each shard retained 10,000 distinct historical event identifiers and 10,000 nonempty payloads. The end-to-end validation confirmed successful retrieval of all 60,000 telemetry records across the three shards.

Inspect an Existing Demonstration
To inspect a completed telemetry run without inserting additional data, execute:
bash scripts/demo.sh --read-only
The script reports current storage placement and validates the existing telemetry records. Depending on the elapsed time, both batches may already reside on Object Storage.
10. Results and Conclusion
The three storage scenarios demonstrate how ClickHouse on OKE can integrate OCI Block Volume and OCI Object Storage to address different analytical workload requirements.
| Storage strategy | Validated result |
| OCI Block Volume | 600,000 rows successfully stored and queried across three shards. |
| OCI Object Storage | 30,000 rows successfully stored and queried across three shards. |
| Automated hot-to-cold storage tiering | 30,000 historical rows automatically moved to Object Storage while 30,000 recent rows remained on Block Volume during the observation. All 60,000 rows were successfully queried, with matching historical checksums across all three shards. |
Independent storage policies allow customers to select the appropriate storage destination for individual tables. Combined storage policies and native TTL rules extend this capability by automatically moving historical data between storage tiers.
For analytical and observability workloads, automated storage tiering can help customers align Block Volume capacity with their recent working set while retaining historical data in OCI Object Storage through the same SQL interface.
Production storage configurations should account for ingestion rates, query patterns, local metadata, background processing, Object Storage requests, and recovery requirements. Movement TTL rules can be configured independently of data deletion and retention policies.
The GitHub repository provides the deployment automation, storage configurations, SQL workloads, and validation scripts to reproduce these storage scenarios on OCI.
11. Cleanup
Before removing a ClickHouse deployment, back up persistent data, local Object Storage metadata, and the corresponding objects as required.
From the selected implementation directory, identify the deployment resources:
bash scripts/cleanup.sh
Automatic deletion is disabled. Review the Kubernetes resources, backing Block Volumes, Object Storage prefix, and backups before performing a manual teardown.
Deleting persistent volume claims can delete their underlying OCI Block Volumes. Removing local Object Storage metadata can also make the corresponding object-backed data unusable.
Refer to the cleanup instructions in the repository:
References
- ClickHouse on OKE with OCI Block Volume, Object Storage, and Automated Storage Tiering
- Oracle Kubernetes Engine
- Configuring Access to an OKE Cluster
- OCI IAM and Kubernetes RBAC for OKE
- Provisioning Persistent Volume Claims on OCI Block Volume
- OCI Object Storage IAM Policies
- Creating an Object Storage Bucket
- OCI Amazon S3 Compatibility API
- Managing Customer Secret Keys
- Altinity ClickHouse Operator
- Altinity Operator Configuration
- ClickHouse MergeTree Storage Engine
- ClickHouse Storage Configuration
- ClickHouse system.parts
- ClickHouse system.part_log
