tree: 38c1e7566cc7461e3642559561844605f4a8ece4
  1. examples/
  2. templates/
  3. .helmignore
  4. Chart.yaml
  5. README.md
  6. values.yaml
helm/activemq/README.md

ActiveMQ Helm Chart

A Helm chart for deploying Apache ActiveMQ on Kubernetes.

Introduction

This chart bootstraps an Apache ActiveMQ broker deployment on a Kubernetes cluster using the Helm package manager. It deploys ActiveMQ as a StatefulSet with persistent storage for the KahaDB message store.

Prerequisites

  • Kubernetes 1.24+
  • Helm 3.10+
  • PV provisioner support in the underlying infrastructure (if persistence is enabled)

Installing the Chart

To install the chart with the release name my-activemq:

helm install my-activemq ./helm/activemq

To install with custom values:

helm install my-activemq ./helm/activemq -f my-values.yaml

Uninstalling the Chart

To uninstall/delete the my-activemq deployment:

helm uninstall my-activemq

Note: Uninstalling the chart does not delete PersistentVolumeClaims created by the StatefulSet. To delete them:

kubectl delete pvc -l app.kubernetes.io/instance=my-activemq

Configuration

General

ParameterDescriptionDefault
replicaCountNumber of broker replicas1
image.repositoryContainer image repositoryapache/activemq-classic
image.tagImage tag (defaults to chart appVersion)""
image.pullPolicyImage pull policyIfNotPresent
imagePullSecretsImage pull secrets for private registries[]
nameOverrideOverride the chart name""
fullnameOverrideOverride the full release name""
terminationGracePeriodSecondsGraceful shutdown timeout60

Broker

ParameterDescriptionDefault
broker.credentials.usernameBroker connection usernameadmin
broker.credentials.passwordBroker connection passwordadmin
broker.credentials.existingSecretUse an existing secret for connection credentials""
broker.web.usernameWeb console usernameadmin
broker.web.passwordWeb console passwordadmin
broker.web.existingSecretUse an existing secret for web credentials""
broker.jmx.enabledEnable JMXfalse
broker.jmx.usernameJMX usernameadmin
broker.jmx.passwordJMX passwordactivemq
broker.jmx.existingSecretUse an existing secret for JMX credentials""
broker.jvmMemoryJVM memory options"-Xms64M -Xmx1G"
broker.jvmOptsAdditional JVM options""
broker.activemqXmlCustom activemq.xml content""
broker.jettyXmlCustom jetty.xml content""
broker.log4j2PropertiesCustom log4j2.properties content""

Service

ParameterDescriptionDefault
service.typeBroker service typeClusterIP
service.annotationsBroker service annotations{}
service.openwire.enabledEnable OpenWire transporttrue
service.openwire.portOpenWire service port61616
service.amqp.enabledEnable AMQP transporttrue
service.amqp.portAMQP service port5672
service.stomp.enabledEnable STOMP transporttrue
service.stomp.portSTOMP service port61613
service.mqtt.enabledEnable MQTT transporttrue
service.mqtt.portMQTT service port1883
service.ws.enabledEnable WebSocket transporttrue
service.ws.portWebSocket service port61614

Web Console

ParameterDescriptionDefault
webConsole.typeWeb console service typeClusterIP
webConsole.portWeb console HTTP port8161
webConsole.annotationsWeb console service annotations{}

Ingress

ParameterDescriptionDefault
ingress.enabledEnable ingress for the web consolefalse
ingress.classNameIngress class name""
ingress.annotationsIngress annotations{}
ingress.hostsIngress hosts configurationSee values.yaml
ingress.tlsIngress TLS configuration[]

Persistence

ParameterDescriptionDefault
persistence.enabledEnable persistent storage for KahaDBtrue
persistence.storageClassNamePVC storage class""
persistence.accessModesPVC access modes["ReadWriteOnce"]
persistence.sizePVC storage size8Gi
persistence.annotationsPVC annotations{}
persistence.selectorPVC selector for matching PVs{}

Resources and Probes

ParameterDescriptionDefault
resources.requests.cpuCPU request500m
resources.requests.memoryMemory request1Gi
resources.limits.cpuCPU limit2
resources.limits.memoryMemory limit2Gi
startupProbeStartup probe (TCP on OpenWire port)See values.yaml
livenessProbeLiveness probe (HTTP on web console)See values.yaml
readinessProbeReadiness probe (TCP on OpenWire port)See values.yaml

Security

ParameterDescriptionDefault
serviceAccount.createCreate a service accounttrue
serviceAccount.annotationsService account annotations{}
serviceAccount.nameService account name""
podSecurityContext.runAsNonRootRun as non-roottrue
podSecurityContext.runAsUserRun as UID1000
podSecurityContext.runAsGroupRun as GID1000
podSecurityContext.fsGroupFilesystem group1000
securityContext.allowPrivilegeEscalationAllow privilege escalationfalse
securityContext.capabilities.dropDropped capabilities["ALL"]

Availability

ParameterDescriptionDefault
podDisruptionBudget.enabledEnable Pod Disruption Budgetfalse
podDisruptionBudget.minAvailableMinimum available pods1

Monitoring

ParameterDescriptionDefault
serviceMonitor.enabledEnable Prometheus ServiceMonitorfalse
serviceMonitor.intervalScrape interval30s
serviceMonitor.labelsAdditional ServiceMonitor labels{}

Scheduling

ParameterDescriptionDefault
nodeSelectorNode selector{}
tolerationsTolerations[]
affinityAffinity rules{}
topologySpreadConstraintsTopology spread constraints[]
podAnnotationsPod annotations{}
podLabelsPod labels{}

Extensibility

ParameterDescriptionDefault
extraEnvExtra environment variables[]
extraVolumesExtra volumes[]
extraVolumeMountsExtra volume mounts[]
initContainersInit containers[]

Accessing ActiveMQ

Web Console

The ActiveMQ Web Console is available on port 8161. To access it locally:

kubectl port-forward svc/my-activemq-web 8161:8161

Then open http://localhost:8161 in your browser and log in with the configured credentials (default: admin/admin).

Broker Connections

Applications can connect to ActiveMQ using the following protocols from within the cluster:

ProtocolURL
OpenWire (JMS)tcp://my-activemq:61616
AMQPamqp://my-activemq:5672
STOMPstomp://my-activemq:61613
MQTTmqtt://my-activemq:1883
WebSocketws://my-activemq:61614

To connect from outside the cluster, use port-forwarding:

kubectl port-forward svc/my-activemq 61616:61616

Then connect to tcp://localhost:61616.

Custom Configuration

You can provide a custom activemq.xml directly in your values file:

broker:
  activemqXml: |
    <beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://activemq.apache.org/schema/core
        http://activemq.apache.org/schema/core/activemq-core.xsd">
      <broker xmlns="http://activemq.apache.org/schema/core"
              brokerName="localhost" dataDirectory="${activemq.data}">
        <!-- your custom configuration here -->
      </broker>
      <import resource="jetty.xml"/>
    </beans>

Similarly, you can customize jetty.xml and log4j2.properties via broker.jettyXml and broker.log4j2Properties.

See the examples/ directory for complete example values files:

  • activemq-custom.yaml - Custom broker configuration with activemq.xml
  • production.yaml - Production-ready settings with external secrets, ingress, and anti-affinity

Credentials

Credentials are stored in Kubernetes Secrets. For production, use existing secrets instead of plaintext values:

broker:
  credentials:
    existingSecret: "my-activemq-credentials"
  web:
    existingSecret: "my-activemq-web-credentials"

Create the secrets beforehand:

kubectl create secret generic my-activemq-credentials \
  --from-literal=connection-username=admin \
  --from-literal=connection-password=s3cur3p4ss

kubectl create secret generic my-activemq-web-credentials \
  --from-literal=web-username=admin \
  --from-literal=web-password=s3cur3p4ss

Persistence

The ActiveMQ image stores message data (KahaDB) at /opt/apache-activemq/data.

By default, the chart creates a PersistentVolumeClaim for each pod via the StatefulSet‘s volumeClaimTemplates. The volume is provisioned dynamically using the cluster’s default StorageClass.

To disable persistence (data will be lost on pod restart):

persistence:
  enabled: false

Monitoring

To enable Prometheus monitoring via the ServiceMonitor CRD:

serviceMonitor:
  enabled: true
  interval: 30s

This requires the Prometheus Operator to be installed in your cluster.