【问题标题】:Adding a health check path on Prisma docker container在 Prisma docker 容器上添加健康检查路径
【发布时间】:2019-05-01 22:07:27
【问题描述】:
我将 Prisma docker container 托管在 Kubernetes 集群上,该集群需要运行状况检查路径来确定容器是否处于活动状态。由于我无法控制此容器中的端点,我将如何添加 Kubernetes 可能命中的健康检查路由?
【问题讨论】:
标签:
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