【问题标题】:Adding a health check path on Prisma docker container在 Prisma docker 容器上添加健康检查路径
【发布时间】:2019-05-01 22:07:27
【问题描述】:

我将 Prisma docker container 托管在 Kubernetes 集群上,该集群需要运行状况检查路径来确定容器是否处于活动状态。由于我无法控制此容器中的端点,我将如何添加 Kubernetes 可能命中的健康检查路由?

【问题讨论】:

  • Prisma 提供了一个management api。您可以使用它来查询服务器和项目信息。其中之一可能适用于健康检查。

标签: docker kubernetes prisma


【解决方案1】:

将此添加到您的 prisma 容器清单文件中。如果您通过 deployment 部署 prisma,请运行:

$ kubectl edit deployment <prisma_deployment_name> --namespace <namespace>

并将以下探针规范放入 prisma 容器规范中。


    livenessProbe:
      httpGet:
        path: /
        port: 4466
      # Number of seconds after the container has started before probes are initiated.
      initialDelaySeconds: 120
      # How often (in seconds) to perform the probe.
      periodSeconds: 10
      # Number of seconds after which the probe times out.
      timeoutSeconds: 60
    readinessProbe:
      httpGet:
        path: /
        port: 4466
      # Number of seconds after the container has started before probes are initiated.
      initialDelaySeconds: 120
      # How often (in seconds) to perform the probe.
      periodSeconds: 10
      # Number of seconds after which the probe times out.
      timeoutSeconds: 60

【讨论】:

    猜你喜欢
    • 2020-09-19
    • 2018-06-14
    • 2021-04-20
    • 2022-08-04
    • 2019-02-28
    • 2019-05-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多