carbone-ee

by Carbone

Helm chartv1.0.9App 5.15.4Verified publisher

Helm chart for Carbone deployment

About this chart

Carbone EE — Helm Chart

Carbone is a fast document generation engine that converts JSON data into PDF, DOCX, XLSX, and other formats using Office templates. This chart deploys Carbone Enterprise Edition on Kubernetes.

Prerequisites

  • Kubernetes 1.23+
  • Helm 3.8+
  • An ingress controller (nginx, traefik…) if external access is required
  • A persistent storage backend (S3, Azure Blob, or a RWX PersistentVolume) for production use

Installation

Add the Carbone Helm repository:

helm repo add carbone https://bin.carbone.io/helm/
helm repo update

Install the chart:

helm upgrade --install carbone-ee carbone/carbone-ee \
  --create-namespace -n carbone \
  -f values.yaml

After installation, run the built-in connectivity test:

helm test carbone-ee -n carbone

Configuration

The recommended approach is to maintain a values.yaml file and pass it with -f. The key parameters are listed below.

Application

ParameterDescriptionDefault
image.tagCarbone image tag (defaults to the chart appVersion)""
image.pullPolicyImage pull policyAlways
replicaCountNumber of replicas4
applicationConfiguration.licenseCarbone EE license key""
applicationConfiguration.portHTTP port4000
applicationConfiguration.peerPortPort of the peer replication WebSocket, used when several pods synchronize template metadata5001
applicationConfiguration.studioEnable Carbone Studio UItrue
applicationConfiguration.studioBasicAuthenticationBasic auth for Studio (user:password)""
applicationConfiguration.authenticationEnable JWT authentication on the APIfalse
applicationConfiguration.authenticationPublicKeyRSA public key for JWT verification""
applicationConfiguration.langDefault localefr
applicationConfiguration.timezoneDefault timezoneEurope/Paris
applicationConfiguration.nbConvertThreadNumber of LibreOffice conversion threads per pod1
applicationConfiguration.timeoutConversionConversion timeout in ms60000
applicationConfiguration.maxInputSizeMax request body size in bytes62914560
applicationConfiguration.templateManagementEnable template CRUD APItrue
applicationConfiguration.jobBalancerDistribute rendering jobs evenly across instances (requires templateManagement: true, Carbone ≥ 5.9.0)false
sharedMemory.enabledMount a tmpfs on /dev/shm for Chrome, instead of the 64Mi a container gets by defaulttrue
sharedMemory.sizeCap of that tmpfs, charged to resources.limits.memory. Empty means uncapped1Gi

Autoscaling

ParameterDescriptionDefault
autoscaling.enabledEnable HorizontalPodAutoscalerfalse
autoscaling.minReplicasMinimum replicas1
autoscaling.maxReplicasMaximum replicas100
autoscaling.targetCPUUtilizationPercentageCPU target for scaling70

Ingress

ParameterDescriptionDefault
ingress.enabledEnable ingresstrue
ingress.classNameIngress class name""
ingress.annotationsIngress annotations{}
ingress.hostsList of hosts and paths[{host: "", paths: [{path: /}]}]
ingress.tlsTLS configuration[]

Storage backends

A persistent storage backend is required for production. Templates and renders need to survive pod restarts and be shared across replicas. Choose one of the following options.

S3 (or S3-compatible)

Works with AWS S3, Scaleway Object Storage, OVH Object Storage, GCS (S3-compatible mode), MinIO, and others.

persistentStorage:
  s3:
    enabled: true
    endpoint: s3.eu-west-1.amazonaws.com
    region: eu-west-1
    templatesBucket: my-carbone-templates
    rendersBucket: my-carbone-renders
    accessKeyId: <ACCESS_KEY_ID>
    accessKeySecret: <ACCESS_KEY_SECRET>

Azure Blob Storage

persistentStorage:
  azureBlobStorage:
    enabled: true
    storageAccount: mystorageaccount
    storageKey: <STORAGE_KEY>
    templatesContainer: carbone-templates
    rendersContainer: carbone-renders

PersistentVolume (RWX)

Suitable for on-premise or single-node setups. For multi-replica deployments, the volume must support ReadWriteMany.

persistentStorage:
  persistentVolume:
    enabled: true
    persistentVolumeClaimName: carbone-pvc
    templateFolder: templates
    rendersFolder: renders

HTML rendering and shared memory

Carbone renders HTML through Chrome, which allocates its renderer shared memory in /dev/shm. A container gets 64Mi there, and Chrome exhausts it on large documents: the tab dies mid-render and the request comes back as a protocol or "target closed" error. The chart therefore mounts a tmpfs of its own on that path, enabled by default:

sharedMemory:
  enabled: true
  size: 1Gi

size is a cap, not a reservation — an idle pod consumes nothing. But a tmpfs lives in RAM and whatever Chrome writes in it counts against resources.limits.memory, so a pod that fills the whole gigabyte has that much less left for the application. Raise the memory limit alongside size if you increase it, and leave size set: an uncapped tmpfs is bounded by the node's memory rather than the pod's.

Unrelated Chrome log lines are expected in a container and harmless: Failed to adjust OOM score of renderer comes from the dropped CAP_SYS_RESOURCE capability, and Failed to send GpuControl.CreateCommandBuffer from the absence of a GPU, after which Chrome falls back to software rendering. Neither affects the output.

Multi-instance and high availability

When replicaCount > 1 or autoscaling.enabled: true, pods automatically discover each other via WebSocket (port 5001) and synchronize template metadata. No additional configuration is required — peer discovery is handled by the headless service.

The peer port is unauthenticated. It carries template replication and job balancing, and it accepts any connection that reaches it: a workload able to open a WebSocket on it can register itself as a Carbone peer, read this deployment's template metadata and be handed rendering jobs queued by its tenants. It is never exposed by a Service or the Ingress, so it is reachable on the pod network only — and the chart ships a NetworkPolicy that closes it to everything but the pods of the release. Keep that policy on, or replace it with an equivalent control of your own.

To distribute rendering jobs evenly across instances, enable the job balancer (requires Carbone ≥ 5.9.0):

applicationConfiguration:
  templateManagement: true  # required
  jobBalancer: true

For optimal availability with multiple replicas, consider adding topology spread constraints to your values.yaml:

affinity:
  podAntiAffinity:
    preferredDuringSchedulingIgnoredDuringExecution:
      - weight: 100
        podAffinityTerm:
          labelSelector:
            matchLabels:
              app.kubernetes.io/name: carbone-ee
          topologyKey: kubernetes.io/hostname

Network policy

Peer replication is what makes the port above worth protecting, so the chart renders a NetworkPolicy exactly when replication is active — templateManagement: true together with more than one replica or with autoscaling. It selects the pods of the release and allows two things:

  • the API port, from every source, so the ingress controller, the kubelet probes and your in-cluster clients are unaffected;
  • the peer port, from the pods of this release only.

It is enabled by default:

networkPolicy:
  enabled: true

A NetworkPolicy is enforced by the CNI plugin, not by Kubernetes. Calico, Cilium and Antrea enforce it. Plain Flannel and a few managed offerings accept the object and ignore it, leaving the peer port open with nothing to show for it. Check what your cluster runs before relying on this.

When legitimate peers live in another namespace, add them rather than turning the policy off:

networkPolicy:
  peerIngressFrom:
    - namespaceSelector:
        matchLabels:
          kubernetes.io/metadata.name: carbone-staging
      podSelector:
        matchLabels:
          app.kubernetes.io/name: carbone-ee

If you know which workloads call the API, you can narrow the HTTP port too. Leave it empty to keep it open to everything, which is the default:

networkPolicy:
  httpIngressFrom:
    - namespaceSelector:
        matchLabels:
          kubernetes.io/metadata.name: ingress-nginx

Verify the policy is in place after an install:

kubectl get networkpolicy -n carbone
kubectl describe networkpolicy carbone-ee-production -n carbone

Upgrade

helm upgrade carbone-ee carbone/carbone-ee -n carbone -f values.yaml

To preview changes before applying:

helm diff upgrade carbone-ee carbone/carbone-ee -n carbone -f values.yaml

Uninstall

helm uninstall carbone-ee -n carbone
kubectl delete namespace carbone

Values file examples

Ready-to-use values files are available for common environments:

EnvironmentFile
Docker Desktop + AWS S3values-docker.yaml
AWS EKS + S3values-eks.yaml
Azure Kubernetes Service + Blob Storagevalues-azure.yaml
Google Kubernetes Engine + S3-compatiblevalues-gcp.yaml
OVH Managed Kubernetes + S3-compatiblevalues-ovh.yaml
Scaleway Kapsule + S3-compatiblevalues-scaleway.yaml

Deploy carbone-ee with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has carbone-ee 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 chartcarbone-ee is pinned at v1.0.9 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