https://github.com/kubernetes/kubernetes/tree/master/docs/user-guide/liveness包含使用 HTTP 和 Container Exec 的应用程序级健康检查。 缺少 TCP 套接字示例配置文件和文档。
例如,没有指向 TCP 套接字示例的链接: http ://kubernetes.io/v1.1/docs/user-guide/walkthrough/k8s201.html#application -health-checking
@arun-gupta 这对我来说很好
ports:
- containerPort: 8080
livenessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 180
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 10
/签名网络
/分配
由于上面评论的工作示例而关闭,并链接了向文档添加示例的 PR
/关闭
最有用的评论
@arun-gupta 这对我来说很好
ports: - containerPort: 8080 livenessProbe: tcpSocket: port: 8080 initialDelaySeconds: 180 readinessProbe: tcpSocket: port: 8080 initialDelaySeconds: 10
https://github.com/kubernetes/kubernetes/blob/8fd414537b5143ab039cb910590237cabf4af783/test/images/goproxy/pod.yaml