gpt4 book ai didi

kubernetes - 为 kubernetes 探针提供多个健康检查 URL

转载 作者:行者123 更新时间:2023-12-05 00:52:06 25 4
gpt4 key购买 nike

我正在使用 容器探针 检查在 kubernetes pod 中的容器内运行的应用程序的健康状况。现在我的示例 pod 配置看起来像,

"spec":{
"containers":[
{
"image":"tomcat",
"name":"tomcat",
"livenessProbe":{
"httpGet":{
"port": 80
},
"initialDelaySeconds": 15,
"periodSeconds": 10
}
}
]
}

就我而言,我需要监控同一个容器的两个端口。 80 443 .但是我找不到在配置文件中为同一个容器提供两个端口的方法。有没有其他方法可以做到这一点?

最佳答案

不可能,尝试将健康检查封装在您的应用程序中

前任:
http://localhost:80/health_check?full =>(代理)=> http://localhost:443/health_check?full

可以帮到您https://github.com/kubernetes/kubernetes/issues/37218

关于kubernetes - 为 kubernetes 探针提供多个健康检查 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43339527/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com