我正在尝试使用kubernetes复制zalenium hub,但遇到了问题。单个zalenium集线器工作正常。如果我添加的副本数超过1,则它会在zalanium实时预览页面(http://zalenium:port/admin/grid/live)中显示403 Forbidden,502 Badgateway,No VNC..etc
有时在实时预览页面中显示502 Badgateway,在Zalenium容器中显示403 Forbidden,无VNC。
请告诉我如何解决此问题。
这是我运行时的kubernetes部署文件。
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.
答案 0 :(得分:0)
不可能,Zalenium仅与一个集线器一起使用,因此只允许一个副本。