Hi experts,
I am trying to setup a temporal environment on k8s with high availability.
On the offical document, I see we recommend a cluster deployment through helm chart. But that seems a little bit complicated for me. We don’t need to setup different numbers of front-ends or workers for now.
In a simplest manner, can I achieve that just by running multiple replicas of the temporal server?
is there any risk for temporal synchronization?
Here is my k8s manifest for temporal server:
apiVersion: apps/v1
kind: Deployment
metadata:
name: temporal-server-deployment
spec:
replicas:2 # ??? Does this work for HA or is there any risk for temporal synchronization???
selector:
matchLabels:
app: temporal-server
template:
metadata:
labels:
app: temporal-server
spec:
containers:
- name: temporal-server
image: temporalio/auto-setup:1.14.0
env:
- name: LANG
value: "en_US.UTF-8"
- name: DB
value: postgresql
- name: DB_PORT
value: "5432"
- name: POSTGRES_USER
value: postgres
- name: POSTGRES_PWD
value: postgres
- name: POSTGRES_SEEDS
value: 10.168.168.221
- name: DYNAMIC_CONFIG_FILE_PATH
value: config/dynamicconfig/development.yaml
- name: PROMETHEUS_ENDPOINT
value: 0.0.0.0:8000
ports:
- containerPort: 7233
- containerPort: 8000
volumeMounts:
- name: config
mountPath: /etc/temporal/config/dynamicconfig
resources:
requests:
cpu: 100m
volumes:
- name: config
configMap:
name: temporal-server-configmap
items:
- key: development.yaml
path: development.yaml
BTW, if this is not a good practise, can anyone share how to generated the k8s manifests for each services?