I am trying to deploy a zeebe cluster (with standalone gateway) on Kubernetes, but the brokers suddenly stop after displaying this:
INFO io.zeebe.broker.system - Bootstrap Broker-0 [6/10]: cluster services
This happens on all nodes unfortunately.
When I get status of the cluster using zbctl
from the gateway I get:
Cluster size: 0
Partitions count: 0
Replication factor: 0
Gateway version: 0.23.1
Brokers:
Broker configuration:
# In ConfigMap zeebe-cluster
# key: application.yml
zeebe:
broker:
gateway:
enable: false
cluster:
clusterName: zeebe-cluster
---
# Kubernetes statefulset configuration file
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: zeebe-cluster
spec:
selector:
matchLabels:
app: zeebe
name: zeebe
serviceName: zeebe
replicas: 3
updateStrategy:
type: RollingUpdate
podManagementPolicy: Parallel
template:
metadata:
labels:
app: zeebe
name: zeebe
spec:
terminationGracePeriodSeconds: 10
containers:
- name: zeebe
image: camunda/zeebe:0.23.1
env:
- name: ZEEBE_LOG_LEVEL
value: debug
- name: ZEEBE_BROKER_CLUSTER_PARTITIONSCOUNT
value: "2" # also tried with 3
- name: ZEEBE_BROKER_CLUSTER_CLUSTERSIZE
value: "3"
- name: ZEEBE_BROKER_CLUSTER_REPLICATIONFACTOR
value: "3"
- name: ZEEBE_BROKER_GATEWAY_NETWORK_PORT
value: "26500"
ports:
- containerPort: 26500
name: gateway
- containerPort: 26501
name: command
- containerPort: 26502
name: internal
- containerPort: 9600
name: metrics
resources:
requests:
cpu: 500m
memory: 2G
limits:
cpu: 1000m
memory: 2G
volumeMounts:
- name: config
mountPath: /usr/local/zeebe/config
- name: startup
mountPath: /usr/local/bin
- name: data
mountPath: /usr/local/zeebe/data
volumes:
- name: config
configMap:
name: zeebe-config
defaultMode: 0777
- name: startup
configMap:
name: zeebe-startup-broker
defaultMode: 0777
volumeClaimTemplate:
- metadata:
name: data
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: basic
resources:
requests:
storage: 5Gi
Startup ConfigMap:
key: startup.sh
#!/bin/bash -xeu
export ZEEBE_BROKER_CLUSTER_NODEID="${HOSTNAME##*-}"
ZEEBE_NODE_ID=$ZEEBE_BROKER_CLUSTER_NODEID
# all broker contact points
ZEEBE_BROKER_CLUSTER_INITIALCONTACTPOINTS="${HOSTNAME}:26502,zeebe-gateway:26502"
for (( i=0; i<$ZEEBE_BROKER_CLUSTER_CLUSTERSIZE; i++ ))
do
if [ "${ZEEBE_NODE_ID}" != "${i}" ]; then
ZEEBE_BROKER_CLUSTER_INITIALCONTACTPOINTS="${ZEEBE_BROKER_CLUSTER_INITIALCONTACTPOINTS},${HOSTNAME:0:(-1)}${i}.zeebe.default.svc.cluster.local:26502"
fi
done
export ZEEBE_BROKER_CLUSTER_INITIALCONTACTPOINTS="${ZEEBE_BROKER_CLUSTER_INITIALCONTACTPOINTS}"
# Normal startup
if [ "$ZEEBE_STANDALONE_GATEWAY" = "true" ]; then
export ZEEBE_GATEWAY_CLUSTER_HOST="${ZEEBE_GATEWAY_CLUSTER_HOST}:-${ZEEBE_HOSTS}"
exec /usr/local/zeebe/bin/gateway
else
exec /usr/local/zeebe/bin/broker
fi
Gateway configuration:
zeebe:
gateway:
cluster:
contactPoint: zeebe-cluster-0.zeebe.default.svc.cluster.local:26502
monitoring:
enabled: true
port: 9600
Any help would be greatly appreciated!