Docker orientdb kubernetes就绪探测错误:gzip:无效标头

Docker orientdb kubernetes就绪探测错误:gzip:无效标头,docker,kubernetes,orientdb,minikube,Docker,Kubernetes,Orientdb,Minikube,我正在尝试使用docker hub中的orientdb:2.125 docker映像,使用以下yaml文件在kubernetes集群上创建orient db部署 apiVersion: extensions/v1beta1 kind: Deployment metadata: name: orientdb namespace: default labels: name: orientdb spec: replicas: 2 revisionHistoryLimit:

我正在尝试使用docker hub中的orientdb:2.125 docker映像,使用以下yaml文件在kubernetes集群上创建orient db部署

apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: orientdb
  namespace: default
  labels:
    name: orientdb
spec:
  replicas: 2
  revisionHistoryLimit: 100
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
  minReadySeconds: 5
  template:
    metadata:
      labels:
        service: orientdb
    spec:
      containers:
        # Custom pod name.
      - name: orientdb-node
        image: orientdb:2.1.25
        imagePullPolicy: Always
        ports:
        - name: http-port
          containerPort: 2480 # WEB port number.
        - name: binary-port
          containerPort: 2424
        livenessProbe:
          httpGet:
            path: /
            port: http-port
          initialDelaySeconds: 60
          timeoutSeconds: 30
        readinessProbe:
          httpGet:
            path: /
            port: http-port
          initialDelaySeconds: 5
          timeoutSeconds: 5
但我得到了以下信息

Readiness probe errored: gzip: invalid header
Liveness probe errored: gzip: invalid header

如何修复orient db的就绪性和活动性探测?

端口2480上的orientdb web应用程序返回Gzip HTTP响应,因此您应该在
httpGet
livenessProbe和ReadinesProbe中添加自定义HTTP头以支持这一点:

livenessProbe:
  httpGet:
    path: /
    port: http-port
    httpHeaders:
    - name: Accept-Encoding
      value: gzip
  initialDelaySeconds: 60
  timeoutSeconds: 30
readinessProbe:
  httpGet:
    path: /
    port: http-port
    httpHeaders:
    - name: Accept-Encoding
      value: gzip
  initialDelaySeconds: 5
  timeoutSeconds: 5