Bitnami ClickHouse Migration to the Official Image

ClickHouse no longer patches 26.2, so rebuilding a Bitnami 26.2 image could not fix the server. What changed when we moved a client to the official 26.10.3.7 image, from data paths and the default user to deleting the old volumes.

By VVV Ops ·

ClickHouse's security policy marks 26.2 as unsupported, so no packager can ship a 26.2 server that carries an upstream security fix. We found this during a CVE assessment for a client whose ClickHouse ran on the Bitnami 26.2.4 image line: the line was unsupported and no vendor fix would come for it. The way out was a move to the official image, 26.10.3.7, in dev and production, ending with the old release and its volumes deleted.

The Bitnami half of the problem is public. Bitnami moved its free catalog to the bitnamilegacy namespace on August 28, 2025, and says the legacy images "will not receive updates, fixes, or support". Broadcom then set June 10, 2026 as the date for the final removal of all Bitnami content from ECR and the AWS Marketplace. For the general problem of finding what is running before you patch it, see our post on patching a Java CVE across a fleet built three ways. This one covers a single stateful service whose image vendor and upstream version both ran out.

Why rebuilding the Bitnami image would not have helped

An image has two owners. The packager owns the OS layer and the startup scripts, and upstream owns the server binary. When a hardened-image or catalog vendor stops, the common stopgap is to rebuild the image yourself with fresh OS packages. That clears findings in the base layer. It does nothing for a finding in the ClickHouse binary, because ClickHouse publishes security fixes only for the versions on its supported list.

On December 6, 2026 that list read 26.11, 26.10, 26.9, 26.8 and 26.3. Everything from 26.4 to 26.7 had already dropped off, along with 26.2 and every 25.x release. A Bitnami ClickHouse therefore needs two decisions: who builds the image from now on, and which ClickHouse line it lands on.

To see whether this applies to you, list the images in use and ask each server for its version:

# Every pod image that still comes from a Bitnami namespace
kubectl get pods -A -o jsonpath='{range .items[*]}{.metadata.namespace}{"\t"}{range .spec.containers[*]}{.image}{" "}{end}{"\n"}{end}' \
  | grep -i bitnami

# The ClickHouse version each server reports
clickhouse-client --query "SELECT version()"

Choosing the ClickHouse line to land on

The changelog labels 26.3 (March 26, 2026) and 26.8 (August 27, 2026) as LTS. 26.10 came out on October 22, 2026 as a regular release. Both kinds are on the supported list today, and the list also shows how the regular ones age: 26.4 through 26.7 are already off it while 26.3 stays.

The team moved to 26.10.3.7. The 26.10 line is on the supported list, so security fixes reach it. The cost is a shorter runway than an LTS line gives, and we would put the next move on the calendar the day this one finishes. If you want fewer of these moves, land on 26.8.

Pin the full version tag. The official repository on Docker Hub also publishes branch tags such as 26.10 and a latest tag that follows the newest release of the newest stable branch. Those move. When we checked on December 6, 2026, the 26.10 tag had been pushed the day before and pointed at 26.10.22.17, while 26.10.3.7 had not changed since October 26. A pod that restarts on a moving tag can come back on a different server version than the one you tested. Those numbers also show what a pin costs. The branch went from 26.10.3 to 26.10.22 in six weeks, so a pinned tag needs a planned bump or it falls behind on fixes inside its own line.

What changes between the two images

The two images are packaged differently, and none of the Bitnami settings carry over on their own. The table below comes from the Bitnami README, the official image's Docker Hub page and its Dockerfile:

| Setting | Bitnami image | Official clickhouse/clickhouse-server | |---|---|---| | Data directory | /bitnami/clickhouse | /var/lib/clickhouse | | Admin user and password | CLICKHOUSE_ADMIN_USER, CLICKHOUSE_ADMIN_PASSWORD | CLICKHOUSE_USER, CLICKHOUSE_PASSWORD | | Config overrides | /bitnami/clickhouse/etc/config.d, /bitnami/clickhouse/etc/users.d | /etc/clickhouse-server/config.d, /etc/clickhouse-server/users.d | | First-start scripts | .sh files in /docker-entrypoint-initdb.d | .sql, .sql.gz and .sh files in /docker-entrypoint-initdb.d | | Empty password | off unless ALLOW_EMPTY_PASSWORD is yes | the default user gets no network access until a password is set | | Server user | clickhouse | clickhouse, uid and gid 101 |

The data path and the user setup are the rows we would check first. The data path changes, so a volume mounted where the Bitnami chart mounted it is a directory the official server never reads, and the server starts empty. The user setup changes too, and the official entrypoint has two branches to know about. With none of CLICKHOUSE_USER, CLICKHOUSE_PASSWORD or CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT set, it limits default to 127.0.0.1 and ::1, so clients in other pods are refused. With CLICKHOUSE_USER set to any other name, it removes default altogether and creates the named user. A dashboard or exporter that still logs in as default breaks in both cases.

File ownership fails more quietly. The same entrypoint changes the owner of its data directories to the clickhouse user only when the container starts as root. Under a pod securityContext that runs as a non-root uid, it skips that step, so a volume written by another image keeps its old owner.

Copying the data instead of reattaching the volume

Because of the path and ownership differences, we would not point the new server at the old volume. Our engineer prepared the move in Terraform, with an S3Queue table and a data copy plan.

S3Queue is a table engine that reads files from an S3 path. On its own it stores nothing; the docs pair it with a materialized view "that converts data from the engine and puts it into a previously created table". Where a table is fed from files in a bucket, the new server can read the same files itself. The engine keeps its record of processed files under keeper_path, so a queue on a new server with its own path starts with no memory of what the old server already loaded. Decide which files it should read before you create it, or you load some of them twice.

-- Illustrative: acme names and bucket, not a real schema
CREATE TABLE acme.events_queue (ts DateTime, user_id UInt64, kind String)
ENGINE = S3Queue('https://acme-events.s3.amazonaws.com/events/*.parquet', 'Parquet')
SETTINGS mode = 'unordered', keeper_path = '/clickhouse/s3queue/acme_events';

CREATE TABLE acme.events (ts DateTime, user_id UInt64, kind String)
ENGINE = MergeTree ORDER BY (kind, ts);

CREATE MATERIALIZED VIEW acme.events_mv TO acme.events
AS SELECT * FROM acme.events_queue;

History that already sits in the old server has to be copied over. The remote table function reads a table on another server, so the copy can run as an INSERT ... SELECT from the new server, with a row count on both sides afterwards. For large tables, BACKUP and RESTORE through S3 is the other route.

-- Illustrative: run on the new server; host, user and password are placeholders
INSERT INTO acme.events
SELECT * FROM remote('clickhouse-old.acme.svc:9000', 'acme.events', 'migrator', 'CHANGE_ME');

SELECT count() FROM acme.events;
SELECT count() FROM remote('clickhouse-old.acme.svc:9000', 'acme.events', 'migrator', 'CHANGE_ME');

Deleting the old release and its volumes

We cut both environments over to the official image and then removed the old release and its volumes. Those are two separate steps. Uninstalling a Helm release deletes its StatefulSet, and the Kubernetes docs are plain about what that leaves: "Deleting and/or scaling a StatefulSet down will not delete the volumes associated with the StatefulSet." The persistentVolumeClaimRetentionPolicy field, stable since Kubernetes 1.32, defaults to Retain for both deletion and scale-down.

So the claims stay, and the disks behind them keep costing money, until someone deletes them on purpose:

# Illustrative: namespace and release name are placeholders
# Check what the selector matches before deleting; not every chart labels its claims
kubectl get pvc -n acme -l app.kubernetes.io/instance=clickhouse-old
kubectl delete pvc -n acme -l app.kubernetes.io/instance=clickhouse-old

# A volume whose reclaim policy is Retain stays as "Released" after its claim is gone
kubectl get pv | grep clickhouse-old

We would delete the claims only after the row counts match and the new server has served traffic for a while, because this step cannot be undone.

CDC into the new server with a blocking snapshot

The same week, we mirrored a user table into ClickHouse through CDC, with a blocking snapshot in dev and in production. The snapshot type matters on a fresh server. Debezium's signalling docs describe two: incremental, the default, which lets streaming continue while the table is read in chunks, and blocking, which "occurs during runtime, after the connector has stopped to stream change events". Streaming resumes once the snapshot finishes.

A blocking snapshot gives the new table one consistent starting copy, and the price is that change events wait while it runs. For a table that has to exist in full before anything reads it, we would make that trade. The signal is a row in the connector's signalling table:

-- Illustrative: schema and table names are placeholders
INSERT INTO acme.debezium_signal (id, type, data)
VALUES ('snapshot-users-1', 'execute-snapshot',
        '{"type": "blocking", "data-collections": ["acme.users"]}');

Phantom creates from the kubectl provider

One follow-up came out of the same Terraform code. Later in the month, the Terraform kubectl provider kept planning a create for the DebeziumServer resource, although the resource already existed. Allowing the provider to 1.19.x fixed it (as a version constraint, that range is written ~> 1.19.0), and we committed the provider lock file so every plan uses the same provider build. Terraform's dependency lock file is where it "remembers the decisions it made" about provider versions, and HashiCorp's docs say to keep it in version control. Without it in the repository, each machine and each CI run resolves the constraint for itself.

We also tried managing the resource with kubernetes_manifest and closed that attempt as not viable. Anyone weighing the same switch should read the limitation in its documentation first: "This resource requires API access during planning time. This means the cluster has to be accessible at plan time and thus cannot be created in the same apply operation."

The old Bitnami release is gone in both environments, and the version clock now runs on 26.10. For the same kind of deadline on a different tool, see our post on Helm 3's end of security support.

If you still run ClickHouse, or any other stateful service, from a Bitnami image line, talk to us. We would start with the two checks from the top of this post: which images still come from a Bitnami namespace, and whether each server's version is on its upstream's supported list.

Tags: bitnami clickhouse migration, container security scanning, secure kubernetes deployments, kubernetes deployment automation, terraform infrastructure as code, legacy system migration