I am trying to replicate zalenium hub using kubernetes but I am facing issues. Single zalenium hub is working fine. If I added replica count more than 1 then it's showing 403 Forbidden, 502 Badgateway, No VNC..etc in zalanium live preview page(http://zalenium:port/admin/grid/live)
It's showing sometimes 502 Badgateway in live preview page and 403 Forbidden, No VNC in zalenium containers.
Please tell me how to solve this issue.
Here is my kubernetes deployment file while running.
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: "1"
generation: 4
labels:
app: zalenium
chart: zalenium-0.1.0
heritage: Tiller
release: releasename
name: zalenium
namespace: default
resourceVersion: "6472109"
selfLink: /apis/extensions/v1beta1/namespaces/default/deployments/zalenium
uid: e37db0c3-97de-11e9-b164-001a4a000076
spec:
progressDeadlineSeconds: 2147483647
replicas: 3
revisionHistoryLimit: 2147483647
selector:
matchLabels:
app: zalenium
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
template:
metadata:
creationTimestamp: null
labels:
app: zalenium
spec:
containers:
- args:
- start
env:
- name: ZALENIUM_KUBERNETES_CPU_REQUEST
value: 250m
- name: ZALENIUM_KUBERNETES_CPU_LIMIT
value: 1000m
- name: ZALENIUM_KUBERNETES_MEMORY_REQUEST
value: 500Mi
- name: ZALENIUM_KUBERNETES_MEMORY_LIMIT
value: 2Gi
- name: DESIRED_CONTAINERS
value: "2"
- name: MAX_DOCKER_SELENIUM_CONTAINERS
value: "10"
- name: SELENIUM_IMAGE_NAME
value: elgalu/selenium
- name: VIDEO_RECORDING_ENABLED
value: "true"
- name: SCREEN_WIDTH
value: "1440"
- name: SCREEN_HEIGHT
value: "900"
- name: MAX_TEST_SESSIONS
value: "1"
- name: NEW_SESSION_WAIT_TIMEOUT
value: "600000"
- name: DEBUG_ENABLED
value: "false"
- name: SEND_ANONYMOUS_USAGE_INFO
value: "true"
- name: TZ
value: UTC
- name: KEEP_ONLY_FAILED_TESTS
value: "false"
- name: RETENTION_PERIOD
value: "3"
image: dosel/zalenium:3
imagePullPolicy: IfNotPresent
name: zalenium
ports:
- containerPort: 4444
protocol: TCP
resources:
requests:
cpu: 500m
memory: 500Mi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /home/seluser/videos
name: videos
- mountPath: /tmp/mounted
name: data
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
serviceAccount: zalenium
serviceAccountName: zalenium
terminationGracePeriodSeconds: 30
volumes:
- emptyDir: {}
name: videos
- emptyDir: {}
name: data```
Expecting it should be run like a single zalenium hub.
It is not possible, Zalenium works only with one hub, so only one replica is allowed.