cosmos-node

by Nodeify

Helm chartv2.6.3App v25.1.0Verified publisher

A professional, production-ready Helm chart for deploying Cosmos SDK blockchain nodes with enterprise-grade features

About this chart

Cosmos Node Helm Chart

A professional, production-ready Helm chart for deploying Cosmos SDK blockchain nodes with enterprise-grade features and security.

✨ Features

  • 🌍 Universal Multi-Chain Support: Deploy any Cosmos SDK blockchain (Cosmos Hub, Osmosis, Juno, etc.)
  • 📊 StatefulSet Architecture: Reliable data persistence with volume claim templates
  • 🔒 Security Hardened: Pod Security Standards, RBAC, Network Policies, and security contexts
  • 📈 Production Ready: Comprehensive health checks, monitoring, and observability
  • 🚀 Bootstrap Automation: Automatic genesis, snapshot, seeds, and addrbook configuration
  • 🏗️ Enterprise Features: HPA, PDB, topology spread constraints, and priority classes
  • 🔧 Highly Configurable: 200+ configuration options with validation and best practices

🏗️ Architecture

This chart deploys a StatefulSet with:

  • Init Container: Handles bootstrap (genesis, seeds, snapshots)
  • Main Container: Runs the Cosmos SDK daemon
  • Persistent Storage: Volume claim templates for reliable data persistence
  • Services: Regular and headless services for P2P and RPC access
  • Security: Comprehensive RBAC, security contexts, and network policies

📋 Prerequisites

  • Kubernetes 1.19+
  • Helm 3.8+
  • PV provisioner support in the underlying infrastructure
  • Minimum 4 CPU cores and 16GB RAM per node

🚀 Quick Start

Basic Installation

# Add the repository
helm repo add nodeify https://nodeify-eth.github.io/helm-charts
helm repo update

# Install Cosmos Hub
helm install my-cosmos-node nodeify/cosmos-node

# Preview the checked-out chart locally (from the repository root)
helm template my-cosmos-node ./charts/cosmos-node

# Install with custom values (save the Cosmos Hub example below as my-values.yaml)
helm install my-cosmos-node nodeify/cosmos-node -f my-values.yaml

The basic installation uses Cosmos Hub defaults and needs no secret values. Before installing, verify that your cluster has a suitable StorageClass and sufficient capacity, and that the selected image, genesis, peers, and snapshot match the target network. The public bootstrap services must be reachable; these examples demonstrate manifest rendering, not a verified live installation or sync.

The YAML below is a complete values override for the quick start. The remaining YAML snippets illustrate individual settings to merge into your values file; custom-chain URLs, peer addresses, and state-sync trust data are examples to replace with current values for your network.

Example Configurations

Cosmos Hub (Mainnet)

chain:
  name: "cosmoshub"
  chainId: "cosmoshub-4"
  daemon: "gaiad"
  home: ".gaia"
  minGasPrices: "0.001uatom"
  denom: "uatom"

bootstrap:
  genesis:
    url: "https://snapshots.polkachu.com/genesis/cosmos/genesis.json"
  snapshot:
    enabled: true
    command: "curl -s https://polkachu.com/api/v2/chain_snapshots/cosmos/mainnet | jq -r .snapshot.url"

image:
  repository: "ghcr.io/cosmos/gaia"
  tag: "v25.1.0"

resources:
  requests:
    cpu: 2
    memory: 4Gi
  limits:
    memory: 48Gi

persistence:
  enabled: true
  size: 500Gi

daemon:
  flags:
    - "--halt-height=0"
    - "--halt-time=0"
    - "--min-retain-blocks=0"

⚙️ Configuration

Core Configuration

ParameterDescriptionDefault
chain.nameChain identifier"cosmos"
chain.chainIdNetwork chain ID"cosmoshub-4"
chain.daemonDaemon binary name"gaiad"
chain.homeHome directory".gaia"
chain.minGasPricesMinimum gas prices"0.001uatom"

Image Configuration

ParameterDescriptionDefault
image.repositoryContainer image repository"ghcr.io/cosmos/gaia"
image.tagContainer image tag"" (uses appVersion)
image.pullPolicyImage pull policy"IfNotPresent"
global.imageRegistryGlobal image registry override""

Bootstrap Configuration

ParameterDescriptionDefault
bootstrap.genesis.urlGenesis file URL"https://snapshots.polkachu.com/genesis/cosmos/genesis.json"
bootstrap.addrbook.urlAddress book URL"https://snapshots.polkachu.com/addrbook/cosmos/addrbook.json"
bootstrap.seeds.listComma-separated seeds list"[email protected]:14956"
bootstrap.snapshot.enabledEnable snapshot downloadtrue
bootstrap.snapshot.urlDirect snapshot URL""
bootstrap.snapshot.commandCommand to get snapshot URL`"curl -s https://polkachu.com/api/v2/chain_snapshots/cosmos/mainnet

Storage Configuration

ParameterDescriptionDefault
persistence.enabledEnable persistent storagetrue
persistence.sizeStorage size"250Gi"
persistence.storageClassStorage class""
persistence.accessModeAccess mode"ReadWriteOnce"

Security Configuration

ParameterDescriptionDefault
podSecurityContext.runAsNonRootRun as non-root usertrue
podSecurityContext.runAsUserUser ID1000
securityContext.readOnlyRootFilesystemRead-only root filesystemfalse
rbac.createCreate RBAC resourcestrue
networkPolicy.enabledEnable network policyfalse

Monitoring & Health Checks

ParameterDescriptionDefault
daemon.monitoring.prometheusEnable Prometheus metricstrue
healthChecks.startup.enabledEnable startup probetrue
healthChecks.liveness.enabledEnable liveness probetrue
healthChecks.readiness.enabledEnable readiness probetrue

🔧 Advanced Configuration

Seeds Configuration

# Single seed
bootstrap:
  seeds:
    list: "[email protected]:14956"

# Multiple seeds (comma-separated)
bootstrap:
  seeds:
    list: "[email protected]:14956,[email protected]:26656"

Custom Chain Example

chain:
  name: "mychain"
  chainId: "mychain-1"
  daemon: "mychaind"
  home: ".mychain"
  minGasPrices: "0.001umytoken"
  denom: "umytoken"
  ports:
    p2p: 26656
    rpc: 26657
    grpc: 9090
    api: 1317

image:
  repository: "myregistry/mychain"
  tag: "v1.0.0"

# Custom bootstrap URLs
bootstrap:
  genesis:
    url: "https://example.com/genesis.json"
    checksum: "abcd1234..."  # Replace with the complete raw SHA256 hex digest
  seeds:
    list: "[email protected]:26656,[email protected]:26656"
  snapshot:
    enabled: true
    url: "https://example.com/snapshot.tar.lz4"
    timeout: 120

# Production settings
resources:
  requests:
    cpu: 8
    memory: 32Gi
  limits:
    cpu: 16
    memory: 64Gi

persistence:
  size: 1Ti
  storageClass: "fast-ssd"

# High availability
podDisruptionBudget:
  enabled: true
  minAvailable: 1

# Security
networkPolicy:
  enabled: true

# Monitoring
daemon:
  monitoring:
    prometheus: true
    address: "0.0.0.0:26660"

service:
  type: LoadBalancer
  annotations:
    service.beta.kubernetes.io/aws-load-balancer-type: "nlb"

State Sync Configuration

network:
  config:
    stateSync:
      enabled: true
      rpcServers:
        - "https://rpc1.cosmos.network:443"
        - "https://rpc2.cosmos.network:443"
      trustHeight: 12345678
      trustHash: "ABCD1234..."

bootstrap:
  snapshot:
    enabled: false  # Disable snapshot when using state sync

Horizontal Pod Autoscaling

autoscaling:
  enabled: true
  minReplicas: 1
  maxReplicas: 3
  targetCPUUtilizationPercentage: 80
  targetMemoryUtilizationPercentage: 80

🛡️ Security Best Practices

This chart implements comprehensive security measures:

Pod Security Standards

  • Non-root user execution (UID 1000)
  • Read-only root filesystem where possible
  • Dropped capabilities (ALL)
  • Seccomp profiles
  • No privilege escalation

RBAC Configuration

  • Minimal required permissions
  • Namespace-scoped roles
  • Service account isolation

Network Security

  • Network policies for ingress/egress control
  • Separate headless service for StatefulSet
  • Port isolation and protocol restrictions

📦 Manual Snapshot Configuration

Overview

The chart provides full manual control over snapshot downloads with two methods: direct URLs or custom commands. No auto-detection is performed.

Configuration Options

1. Direct Snapshot URL:

bootstrap:
  snapshot:
    enabled: true
    url: "https://example.com/snapshot.tar.lz4"
    command: ""  # Leave empty when using direct URL

2. Custom Command (e.g., your curl command):

bootstrap:
  snapshot:
    enabled: true
    url: ""  # Leave empty when using command
    command: "curl -s https://polkachu.com/api/v2/chain_snapshots/cosmos/mainnet | jq -r .snapshot.url"

3. Disable Snapshots:

bootstrap:
  snapshot:
    enabled: false

Usage Examples

Using Direct LZ4 URL:

bootstrap:
  snapshot:
    enabled: true
    url: "https://snapshots.mycdn.com/cosmos-20240115.tar.lz4"
    timeout: 120  # 2 hours for large snapshots

Using Your Curl Command:

bootstrap:
  snapshot:
    enabled: true
    command: "curl -s https://polkachu.com/api/v2/chain_snapshots/cosmos/mainnet | jq -r .snapshot.url"
    timeout: 60

Chain-Specific Examples:

# Cosmos Hub with direct URL
chain:
  name: "cosmos"
bootstrap:
  snapshot:
    url: "https://cosmos-snapshots.polkachu.com/snapshots/cosmos/cosmos_12345678.tar.lz4"

# Osmosis with API command
chain:
  name: "osmosis"
bootstrap:
  snapshot:
    command: "curl -s https://polkachu.com/api/v2/chain_snapshots/osmosis/mainnet | jq -r .snapshot.url"

# Custom chain with your own snapshot
chain:
  name: "mychain"
bootstrap:
  snapshot:
    url: "https://my-snapshots.com/mychain-latest.tar.lz4"

How It Works

  1. Direct URL: Downloads directly from the specified URL
  2. Custom Command: Executes your command, expects it to return a single URL
  3. Validation: Validates the URL format before downloading
  4. Download: Uses aria2c for fast, resumable downloads
  5. Extract: Extracts LZ4-compressed tar archives with progress monitoring

📊 Monitoring & Observability

Prometheus Metrics

The chart exposes Prometheus metrics on port 26660 by default:

daemon:
  monitoring:
    prometheus: true
    address: "0.0.0.0:26660"

Health Checks

  • Startup Probe: Ensures node starts properly (600 failures, 30s intervals)
  • Liveness Probe: Monitors block height progression
  • Readiness Probe: Checks RPC endpoint availability

Logging

Structured JSON logging is enabled by default:

daemon:
  logLevel: "info"
  logFormat: "json"

🔄 Upgrades & Maintenance

Chart Upgrades

# Upgrade using the same reviewed values
helm repo update
helm upgrade my-cosmos-node nodeify/cosmos-node -f my-values.yaml

# Upgrade with an image version reviewed for the existing chain
helm upgrade my-cosmos-node nodeify/cosmos-node -f my-values.yaml \
  --set-string image.tag=v25.1.0

Data Migration

The StatefulSet ensures data persistence across upgrades. For major chain upgrades:

  1. Stop the current deployment
  2. Backup the data volume
  3. Update configuration
  4. Deploy with new parameters

Rollback

# Rollback to previous revision
helm rollback my-cosmos-node 1

🐛 Troubleshooting

Common Issues

Pod Stuck in Init

# Check init container logs
kubectl logs <pod-name> -c init-chain

# Common causes:
# - Genesis download failure
# - Insufficient storage
# - Network connectivity issues

Node Not Syncing

# Check main container logs
kubectl logs <pod-name> -c cosmos-node

# Check probe script
kubectl exec <pod-name> -- /scripts/probe.sh

Storage Issues

# Check PVC status
kubectl get pvc

# Check storage class
kubectl get storageclass

Debug Mode

Enable debug logging:

daemon:
  logLevel: "debug"
  flags:
    - "--log_level=debug"
    - "--rpc.unsafe=true"  # Only for debugging

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Testing

# Lint the chart
helm lint .

# Test template rendering
helm template test . --debug

# Test installation
helm install test . --dry-run --debug

📝 License

The chart metadata declares Apache License 2.0.

🙏 Acknowledgments

  • Cosmos SDK team
  • Polkachu for snapshot and bootstrap services
  • Cosmos community for feedback and contributions

📞 Support


Made with ❤️ by the Cosmos community

Compatibility note for 2.6.2

Genesis checksum validation now checks the downloaded genesis file before the entrypoint moves it to genesis.json. Supply the raw SHA256 hex digest in bootstrap.genesis.checksum; leaving it empty continues to skip checksum valid

Deploy cosmos-node with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cosmos-node on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartcosmos-node is pinned at v2.6.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply