db2-instance-eap

by joaquinito2051

Helm chartv2.1.0App 2.1.0

Early Access Program - A helm chart to template Db2uInstance CRs for db2-operator-v2

About this chart

DB2 Instance Helm Chart

Generate DB2 instance manifests using profile-based configuration. Review the generated YAML before applying to your cluster.

Quick Start

# 1. Generate the manifest
helm template my-db2 . -f values-dev.yaml \
  --namespace db2u \
  --set image.tag=12.1.6.0 \
  --set storageclassname.rwo=<your-rwo-class> \
  --set storageclassname.rwx=<your-rwx-class> \
  --output-dir renders/dev

# 2. Review it
cat renders/dev/db2-instance/templates/db2-oltp.yaml

# 3. Apply it
oc apply -f renders/dev/db2-instance/templates/

The --namespace flag controls the namespace in the generated manifests. If omitted, Helm uses your current kubectl context namespace.


Profile Files

There are two profile files. Start with values-dev.yaml — no decisions needed beyond image tag and storage classes.

values-dev.yaml — Development / Evaluation

Single-node OLTP. Minimal resources. For local testing, CI, and evaluating DB2.

helm template my-db2 . -f values-dev.yaml \
  --namespace db2u \
  --set image.tag=12.1.6.0 \
  --set storageclassname.rwo=<your-rwo-class> \
  --set storageclassname.rwx=<your-rwx-class> \
  --output-dir renders/dev

oc apply -f renders/dev/db2-instance/templates/

values-prod.yaml — Production (Warehouse MPP default)

Multi-node Warehouse MPP. Choose a size with --set profile.size=small|medium|large.

helm template my-db2 . -f values-prod.yaml \
  --namespace db2u \
  --set profile.size=small \
  --set image.tag=12.1.6.0 \
  --set storageclassname.rwo=<your-rwo-class> \
  --set storageclassname.rwx=<your-rwx-class> \
  --output-dir renders/prod

oc apply -f renders/prod/db2-instance/templates/

Production Workload Types

The default production workload is Warehouse MPP. Layer an example file to switch workload type:

WorkloadWhat it isHow to select
Warehouse MPP (default)Multi-node analytics warehousevalues-prod.yaml alone
Warehouse SMPSingle-node analytics warehouse+ -f examples/prod-wh-smp.yaml
OLTPSingle-node transactional database+ -f examples/prod-oltp.yaml
# OLTP
helm template my-db2 . -f values-prod.yaml -f examples/prod-oltp.yaml \
  --namespace db2u --set profile.size=small --set image.tag=12.1.6.0 \
  --set storageclassname.rwo=<rwo> --set storageclassname.rwx=<rwx> \
  --output-dir renders/prod-oltp

# Warehouse SMP
helm template my-db2 . -f values-prod.yaml -f examples/prod-wh-smp.yaml \
  --namespace db2u --set profile.size=small --set image.tag=12.1.6.0 \
  --set storageclassname.rwo=<rwo> --set storageclassname.rwx=<rwx> \
  --output-dir renders/prod-wh-smp

Production Size Reference

Set via --set profile.size=<size>. All sizes are certified workload specifications.

OLTP (examples/prod-oltp.yaml)

Sizing: memory = 4 GB/core · data = 4.5× memory · all volumes = 20% of data

SizeNodesCPUMemoryData
small1832Gi144Gi
medium132128Gi576Gi
large164256Gi1152Gi

Full OLTP storage per node:

VolumeAccesssmallmediumlarge
metaRWX29Gi115Gi230Gi
backupRWX29Gi115Gi230Gi
archivelogsRWX29Gi115Gi230Gi
dataRWO144Gi576Gi1152Gi
activelogsRWO29Gi115Gi230Gi
temptsRWO29Gi115Gi230Gi

Warehouse SMP (examples/prod-wh-smp.yaml)

Sizing: memory = 16 GB/core · data = 4.5× memory · all volumes = 20% of data

SizeNodesCPUMemoryData
small18128Gi576Gi
medium132512Gi2304Gi
large1641024Gi4608Gi

Full Warehouse SMP storage per node:

VolumeAccesssmallmediumlarge
metaRWX115Gi461Gi922Gi
backupRWX115Gi461Gi922Gi
archivelogsRWX115Gi461Gi922Gi
dataRWO576Gi2304Gi4608Gi
temptsRWO115Gi461Gi922Gi

Warehouse MPP (values-prod.yaml default)

Sizing: memory = 16 GB/core · data = 4.5× memory · all volumes = 20% of data

SizeNodesCPU/nodeMemory/nodeData/node
small38128Gi576Gi
medium732512Gi2304Gi
large9641024Gi4608Gi

Full Warehouse MPP storage per node:

VolumeAccesssmallmediumlarge
metaRWX115Gi461Gi922Gi
backupRWX115Gi461Gi922Gi
archivelogsRWX115Gi461Gi922Gi
dataRWO576Gi2304Gi4608Gi
temptsRWO115Gi461Gi922Gi

Required Parameters

ParameterDescriptionExample
image.tagDB2 version12.1.6.0
storageclassname.rwoReadWriteOnce storage classebs-sc
storageclassname.rwxReadWriteMany storage classefs-sc
profile.sizeWorkload size (prod only)small

Cloud Provider Storage Classes

Layer a cloud example file to set the storage classes for your platform.

PlatformRWX (rwx)RWO (rwo)Example files
AWS EKS / ROSAefs-scebs-scaws-eks-*.yaml
Azure AKSazurefile-nfsazuredisk-premiumazure-aks-*.yaml
Azure AROocs-storagecluster-cephfsocs-storagecluster-ceph-rbdazure-aro-*.yaml
GCP GKEstandard-db2u-rwxstandard-rwogcp-gke-*.yaml
On-Premisesyour NFS classyour NFS class—
# Example: AWS EKS, Warehouse MPP medium
helm template my-db2 . -f values-prod.yaml -f examples/aws-eks-db2wh-mpp.yaml \
  --namespace db2u --set profile.size=medium --set image.tag=12.1.6.0 \
  --output-dir renders/aws-prod

oc apply -f renders/aws-prod/db2-instance/templates/

High Availability (Db2uHa)

HA mode emits a Db2uHa CR instead of a Db2uInstance. It wraps the same sizing profile with standby replicas and read/write service endpoints. Supported workloads: oltp and warehouse-smp (not warehouse-mpp).

# HA OLTP
helm template my-db2 . -f values-prod.yaml -f examples/db2uha-oltp.yaml \
  --namespace db2u --set profile.size=small --set image.tag=12.1.6.0 \
  --set storageclassname.rwo=<rwo> --set storageclassname.rwx=<rwx> \
  --output-dir renders/db2uha-oltp

# HA Warehouse SMP
helm template my-db2 . -f values-prod.yaml -f examples/db2uha-smp.yaml \
  --namespace db2u --set profile.size=small --set image.tag=12.1.6.0 \
  --set storageclassname.rwo=<rwo> --set storageclassname.rwx=<rwx> \
  --output-dir renders/db2uha-smp
ParameterDescriptionDefault
ha.enabledEmit Db2uHa instead of Db2uInstancefalse
ha.standbyReplicasNumber of standby replicas (required)—
ha.enableReadOnlyReplicasExpose standbys as read-only endpointstrue
ha.syncModePrincipal sync mode (NEARSYNC, SYNC, ASYNC)—
ha.timeoutHA timeout in seconds120
ha.peerWindowPeer window in seconds120
ha.readWriteServiceTypeService type for primary endpointClusterIP
ha.readOnlyServiceTypeService type for standby endpointClusterIP

Note: ha.enabled=true with warehouse-mpp is rejected at render time.


Optional Add-ons

Layer an example file to enable add-ons:

SSL/TLS

helm template my-db2 . -f values-dev.yaml -f examples/db2oltp-with-ssl.yaml \
  --namespace db2u --set image.tag=12.1.6.0 \
  --set storageclassname.rwo=<rwo> --set storageclassname.rwx=<rwx> \
  --output-dir renders/dev-ssl

Parameters: ssl.enabled, ssl.secretName (required), ssl.allowSslOnly, ssl.certLabel

LDAP Authentication

helm template my-db2 . -f values-prod.yaml -f examples/db2wh-with-ldap.yaml \
  --namespace db2u --set profile.size=small --set image.tag=12.1.6.0 \
  --set storageclassname.rwo=<rwo> --set storageclassname.rwx=<rwx> \
  --output-dir renders/prod-ldap

Parameters: ldap.enabled, ldap.configMapName (required), ldap.searcherPassword, ldap.transparentLdap

NCOS (Native Cloud Object Storage)

helm template my-db2 . -f values-prod.yaml -f examples/db2wh-with-ncos.yaml \
  --namespace db2u --set profile.size=small --set image.tag=12.1.6.0 \
  --set storageclassname.rwo=<rwo> --set storageclassname.rwx=<rwx> \
  --output-dir renders/prod-ncos

Parameters: ncos.enabled, ncos.cosProvider (required: self-hosted or cloud), ncos.storageSize (required)

Open Data Formats (ODF)

helm template my-db2 . -f values-prod.yaml -f examples/db2wh-with-odf.yaml \
  --namespace db2u --set profile.size=small --set image.tag=12.1.6.0 \
  --set storageclassname.rwo=<rwo> --set storageclassname.rwx=<rwx> \
  --output-dir renders/prod-odf

OpenShift SCC

# OCP 4.11+ (recommended)
helm template my-db2 . -f values-prod.yaml -f examples/db2wh-restricted-v2.yaml \
  --namespace db2u --set profile.size=small --set image.tag=12.1.6.0 \
  --set storageclassname.rwo=<rwo> --set storageclassname.rwx=<rwx> \
  --output-dir renders/prod-restricted-v2

Parameter: securityContext.sccMode — "restricted-v2" or "restricted"


Overriding Profile Values

The profile size spec is the baseline. Any individual value can be overridden at deploy time using --set override.* without changing the rest of the profile.

# Override just data storage
helm template my-db2 . -f values-prod.yaml \
  --namespace db2u --set profile.size=medium --set image.tag=12.1.6.0 \
  --set storageclassname.rwo=ebs-sc --set storageclassname.rwx=efs-sc \
  --set override.storage.data=3000Gi \
  --output-dir renders/prod-custom

# Override CPU and memory
helm template my-db2 . -f values-prod.yaml \
  --namespace db2u --set profile.size=small --set image.tag=12.1.6.0 \
  --set storageclassname.rwo=ebs-sc --set storageclassname.rwx=efs-sc \
  --set override.resources.cpu=16 \
  --set override.resources.memory=256Gi \
  --output-dir renders/prod-custom

# Override multiple values
helm template my-db2 . -f values-prod.yaml -f examples/prod-oltp.yaml \
  --namespace db2u --set profile.size=small --set image.tag=12.1.6.0 \
  --set storageclassname.rwo=ebs-sc --set storageclassname.rwx=efs-sc \
  --set override.storage.data=800Gi \
  --set override.storage.activelogs=200Gi \
  --set override.resources.cpu=12 \
  --output-dir renders/prod-oltp-custom
Override fieldDescriptionWorkloads
override.nodesNode countall
override.resources.cpuCPU limitall
override.resources.memoryMemory limitall
override.storage.dataData volume sizeall
override.storage.temptsTemp tablespace sizeall
override.storage.metaMetadata volume sizeall
override.storage.backupBackup volume sizeall
override.storage.archivelogsArchive logs volume sizeall
override.storage.activelogsActive logs volume sizeOLTP only

Validation

The chart validates inputs and fails fast with clear messages:

ERROR: profile.size="xlarge" is not valid. Must be one of: dev, small, medium, large
ERROR: image.tag is required. Please specify the DB2 version (e.g., --set image.tag=12.1.6.0)
ERROR: storageclassname.rwo is required.
ERROR: ssl.secretName is required when SSL is enabled.

Examples Directory

examples/
├── prod-oltp.yaml                # switch to OLTP workload
├── prod-wh-smp.yaml              # switch to Warehouse SMP (single-node)
├── db2uha-oltp.yaml              # HA OLTP (Db2uHa)
├── db2uha-smp.yaml               # HA Warehouse SMP (Db2uHa)
├── db2oltp-with-ssl.yaml         # OLTP + SSL
├── db2oltp-restricted.yaml       # OLTP + OpenShift restricted SCC
├── db2wh.yaml                    # Warehouse base (name + storage classes)
├── db2wh-with-ldap.yaml          # Warehouse + LDAP
├── db2wh-with-ncos.yaml          # Warehouse + NCOS
├── db2wh-with-odf.yaml           # Warehouse + ODF
├── db2wh-restricted.yaml         # Warehouse + OpenShift restricted SCC
├── db2wh-restricted-v2.yaml      # Warehouse + OpenShift restricted-v2 SCC
├── aws-eks-db2oltp.yaml          # AWS EKS / ROSA — OLTP
├── aws-eks-db2wh-smp.yaml        # AWS EKS / ROSA — Warehouse SMP
├── aws-eks-db2wh-mpp.yaml        # AWS EKS / ROSA — Warehouse MPP
├── azure-aks-db2oltp.yaml        # Azure AKS — OLTP
├── azure-aks-db2wh-smp.yaml      # Azure AKS — Warehouse SMP
├── azure-aks-db2wh-mpp.yaml      # Azure AKS — Warehouse MPP
├── azure-aro-db2oltp.yaml        # Azure ARO — OLTP
├── azure-aro-db2wh-smp.yaml      # Azure ARO — Warehouse SMP
├── azure-aro-db2wh-mpp.yaml      # Azure ARO — Warehouse MPP
├── gcp-gke-db2oltp.yaml          # GCP GKE — OLTP
├── gcp-gke-db2wh-smp.yaml        # GCP GKE — Warehouse SMP
└── gcp-gke-db2wh-mpp.yaml        # GCP GKE — Warehouse MPP

Deploy db2-instance-eap with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has db2-instance-eap 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 chartdb2-instance-eap is pinned at v2.1.0 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