kubernetes - k8s什么时候重试liveness probe?
问题描述
我试图了解活动探测的重试行为,从文档中不清楚。
我将举例说明。考虑以下活动探测规范
periodSeconds: 60
timeoutSeconds: 15
failureThreshold: 3
让我们假设服务已关闭
预期哪种行为?
the probe kicks off at 0s
sees a failure at 15s, (due to timeoutSeconds 15)
retry1 at ~15s, fail at ~30s and retry2 at ~30s, fail at ~45 (retry immediately after failure)
ultimately restart pod at ~45s (due to failureThreshold 3)
或者
the probe kicks off at 0s
sees a failure at 15s, (due to timeoutSeconds 15)
retry1 at ~60s, fail at ~75s and retry2 at ~120s, fail at ~135s (due to periodSeconds 60, doesnt really do retry after a failure)
ultimately restart pod at ~180s (due to failureThreshold 3)
解决方案
periodSeconds
是它检查的频率。如果您的意思是在超过失败阈值后重试,它永远不会因为容器从头开始完全重新启动。
推荐阅读
- php - html表单上是否可以有多个enctypes?
- python - 无法使用 cython 获得预期的加速(在字符串列表中搜索)
- php - 传递给 Illuminate\Database\Query\Builder::cleanBindings() 的参数 1 必须是数组类型,给定字符串,
- python - 如何在 python 中使用 pip 克服海拔错误
- c# - 如何强制派生类在 C# 中实现属性
- node.js - Node JS Discord 日志 guildMemberUpdate
- react-native - 单元测试开玩笑酶在 Formik 'resetForm' 上引发错误
- java - Spring Cloud Configuration - 访问所有微服务中的共享属性文件
- python - 使用open-cv从左到右的vstack矩形
- java - 如何在 agora.io Java 中为每个用户生成唯一的频道名称?