Deploy Chia full nodes into Kubernetes with a Docker image + Helm chart workflow.
- Docker image build for a Chia node (
Dockerfile,docker_build.sh) - Runtime startup and health logic (
docker-entrypoint.sh,docker-start.sh,docker-healthcheck.sh) - Helm chart and helper scripts for deploy/diff/update (
helm/)
- Docker with
buildx - Kubernetes cluster +
kubectlcontext configured - Helm 3
helm-diffplugin (required byhelm/diff.sh)- StorageClass suitable for node DB volumes
- Clone the repo.
- Build and push image:
DOCKER_REPO="docker.repo.com/library/path" ./docker_build.sh-
Create an environment-specific values file in
helm/chia-node/, for example:values-my-mainnet.yamlvalues-my-testnet.yaml
-
In that file, override at least:
chia-blockchain.nameOverridechia-blockchain.fullnameOverridechia-blockchain.chia.ca.private_ca_crtchia-blockchain.chia.ca.private_ca_keychia-blockchain.image.repositorychia-blockchain.image.tag
-
cd helm -
Select env file and update chart dependencies:
Mainnet:
CI_ENVIRONMENT=<mainnet-values-suffix> ENV_FILE=./env ./update-chart.shTestnet:
CI_ENVIRONMENT=<testnet-values-suffix> ENV_FILE=./env_testnet ./update-chart.sh- Check Helm diff:
Mainnet:
CI_ENVIRONMENT=<mainnet-values-suffix> ENV_FILE=./env ./diff.shTestnet:
CI_ENVIRONMENT=<testnet-values-suffix> ENV_FILE=./env_testnet ./diff.sh- Deploy:
Mainnet:
CI_ENVIRONMENT=<mainnet-values-suffix> ENV_FILE=./env ./upgrade.shTestnet:
CI_ENVIRONMENT=<testnet-values-suffix> ENV_FILE=./env_testnet ./upgrade.sh- Verify rollout in Kubernetes.
Container startup is:
-
docker-entrypoint.sh- Sets timezone (
TZ) if provided. - Activates Chia virtualenv.
- Runs
chia init --fix-ssl-permissions. - If
cais set, runschia init -c <ca>(in chart this is/chia-cawhen private CA values are provided). - Applies network/testnet/log/upnp/crawler settings.
- Optionally restores a DB checkpoint (see below).
- Updates
config.yamlfields (self_hostname, log stdout behavior, log level). - Executes command (
docker-start.sh).
- Sets timezone (
-
docker-start.sh- Runs
chia start <service>. - Traps
SIGINT/SIGTERMto stop services cleanly. - Tails Chia log when
log_to_file=true; otherwise container stays alive withtail -F /dev/null.
- Runs
docker-healthcheck.sh runs for Docker HEALTHCHECK and Kubernetes startupProbe, readinessProbe, and livenessProbe.
- If
healthcheck != true, script exits success. - It always checks daemon port
55400withnc. - Depending on
service, it checks specific Chia RPChealthzendpoints via mutual TLS:- Node:
https://localhost:8555/healthz - Farmer:
https://localhost:8559/healthz - Harvester:
https://localhost:8560/healthz - Wallet:
https://localhost:9256/healthz
- Node:
- It retries around transient failures.
- During checkpoint restore (
aria2c/tarrunning), failures are tolerated to avoid restart loops.
The image defaults use_checkpoint=true.
On startup, entrypoint checks existing DB size in ${CHIA_ROOT}/db:
- Mainnet DB target:
blockchain_v2_mainnet.sqlite - Testnet DB target:
blockchain_v2_testnet11.sqlite
If DB is considered too small, it downloads a prebuilt compressed DB snapshot torrent from torrents.chia.net, extracts it into ${CHIA_ROOT}/db, and starts from that checkpoint instead of syncing from genesis. This significantly reduces initial sync time.
The default checkpoint URLs can be overridden through chart env values:
chia-blockchain:
chia:
env:
mainnet_checkpoint_url: https://torrents.chia.net/databases/mainnet/mainnet.2026-04-01.tar.gz.torrent
mainnet_checkpoint_archive: mainnet.2026-04-01.tar.gz
testnet_checkpoint_url: https://torrents.chia.net/databases/testnet11/testnet11.2026-04-01.tar.gz.torrent
testnet_checkpoint_archive: testnet11.2026-04-01.tar.gzIf the archive name is the torrent URL basename without .torrent, the *_checkpoint_archive value can be omitted.
- Base chart values:
helm/chia-node/values.yaml - Per-environment overrides are expected by scripts as:
helm/chia-node/values-$CI_ENVIRONMENT.yaml
- Deploy scripts load variables from
helm/envorhelm/env_testnet:SERVICE_NAMEVALUES_PATHCI_NAMESPACECI_ENVIRONMENT(needed bydiff.sh/upgrade.sh)
diff.sh,upgrade.sh, andupdate-chart.shprompt for confirmation in interactive shells. In CI or other non-interactive shells, setCI_ASSUME_YES=trueto proceed.
- If
diff.sh/upgrade.shfail on missing values file, ensureCI_ENVIRONMENTmatches your override filename suffix (for examplevalues-aws-mainnet.yaml=>CI_ENVIRONMENT=aws-mainnet). - If pods restart during bring-up, inspect logs for CA/config issues and verify your private CA cert/key are valid and correctly indented YAML block scalars.