docker - orientdb kubernetes准备就绪探针错误:gzip:无效的 header

标签 docker kubernetes orientdb minikube

我正在尝试使用以下yaml文件在kubernetes集群上使用orientdb:2.125来自docker hub的docker镜像在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和readinessProbe中添加自定义HTTP header 以支持此操作:

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

关于docker - orientdb kubernetes准备就绪探针错误:gzip:无效的 header ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48451003/

相关文章:

qt - 我可以从 Windows 应用程序执行 Linux 二进制文件吗?

java - OGraphDatabase ClassNotFoundException OrientDB 1.7.8

clojure - 是否有(最好是 native 的)Clojure 绑定(bind)到 OrientDB,支持最新版本的二进制 API?

docker - 无法连接到位于 unix :///var/run/docker. sock 的 Docker 守护程序。 docker 守护进程是否正在运行?

python-3.x - 如何在 Docker 容器内并行运行 Pytest 中的测试?

kubernetes - 一个k8s集群可以容纳多少个namespace?

docker - openshift 集群中 Kaniko 作业的权限被拒绝

python - 当我使用pip构建docker时安装psycopg2有错误

python - docker 中的 Django shell 模式

lucene - 如何在 OrientDb 中使用带参数的 NGramTokenizer 创建 Lucene 索引?