
dyrnq/livenessproberegistry.k8s.io/sig-storage/livenessprobe是由Kubernetes SIG Storage(存储特别兴趣小组)维护的官方存活探针工具镜像。该镜像包含轻量级可执行程序,用于实现Kubernetes容器的存活探测逻辑,遵循Kubernetes探针规范,可与kubelet协同工作以监控容器健康状态。
主要用于Kubernetes集群中Pod的存活探针(Liveness Probe)配置,特别是以下场景:
以下是在Kubernetes Pod中使用该镜像作为存活探针执行器的示例YAML配置:
yamlapiVersion: v1 kind: Pod metadata: name: livenessprobe-demo spec: containers: - name: demo-container image: nginx:alpine livenessProbe: exec: command: ["/livenessprobe", "--check-command", "curl -f http://localhost:80/health || exit 1"] initialDelaySeconds: 10 # 容器启动后延迟10秒开始探测 periodSeconds: 5 # 每5秒执行一次探测 timeoutSeconds: 2 # 探测超时时间2秒 failureThreshold: 3 # 连续3次失败则重启容器 resources: limits: cpu: "100m" memory: "64Mi" requests: cpu: "50m" memory: "32Mi"
说明:示例中通过
exec方式调用/livenessprobe工具执行自定义探测命令(检查Nginx的健康端点),当命令返回非0 exit code时,Kubelet判定容器存活探测失败并触发重启。
initialDelaySeconds(确保应用启动完成)、timeoutSeconds(避免过长阻塞)等参数,防止误判。securityContext(如非root用户运行),降低安全风险。manifest unknown 错误
TLS 证书验证失败
DNS 解析超时
410 错误:版本过低
402 错误:流量耗尽
身份认证失败错误
429 限流错误
凭证保存错误
来自真实用户的反馈,见证轩辕镜像的优质服务