kubernetes - 当容器遇到设备错误时,它告诉 kubernetes 的最佳方法是什么?
问题描述
给定一个运行中的容器,该容器已分配给一个到多个 SRIOV 设备,由集群主控器上的调度程序在启动期间分配,如果使用该设备的容器应用程序遇到设备超时,它应该如何报告错误到 Kubernetes?
这几乎就像一个 HA 事件之类的事情......所以从应用程序的角度来看,也许有最好的方法来做到这一点?
解决方案
Kubernetes Liveness 和 Readiness Probes可用于执行此操作:
livenessProbe:
exec:
command:
- <command or HTTP GET to check SRIOV device timeout>
initialDelaySeconds: 5
periodSeconds: 5
readinessProbe:
exec:
command:
- <command or HTTP GET to check SRIOV device timeout>
initialDelaySeconds: 5
periodSeconds: 5
以下是检查 pod 运行状况的更多链接:
推荐阅读
- swift - dateComponents(_, from, to) 返回错误数据,直到 Picker 被触摸
- jira - 如何为 Jira 自定义插件添加用户选择器字段
- php - MySQL使用php检查是否为空值是否为空
- c# - 自定义提示未显示完整数据
- bitnami - 如何添加虚拟主机而无需在 bitnami 服务器中重新启动 apache
- scala - 在akka-streams中为JsonFraming添加EOF时添加自定义逻辑/回调/处理程序
- php - 重定向回起始页面时如何显示在下拉菜单中选择的原始名称?
- javascript - Vue 页面中的 Chart.js 抛出错误:不要在突变处理程序之外改变 vuex 存储状态
- typescript - 如何在 react-admin 中动态添加请求标头?
- javascript - 我想上传到 aws s3 存储桶,但我的代码显示此错误