我将Prisma docker container托管在Kubernetes集群上,该集群需要运行状况检查路径来确定容器是否还处于活动状态。由于我对此容器中的端点没有任何控制权,我该如何添加Kubernetes可能命中的运行状况检查路由?
答案 0 :(得分:2)
将此添加到您的prisma容器清单文件。如果通过deployment
部署pyramida,请运行:
$ 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