[Kubernetes] Pod Health
Kubernetes relies on Probes to determine the health of a Pod container. A Probe is a diagnostic performed periodically by the kubelet on a container.
There are two types of Probes:
1. Livenss Probe
Liveness probes can be used to determine if a Pod is healthy and running as expected
2. Readiness Probe
Readiness probes can be used to determine if a Pod should receive requests
Failed Pod containers are recreated by default (restartPolicy defaults to Always).
What is the way to check Pod health?
ExecAction: Excutes an action inside the container
TSPSockerAction: TCP check against the container's IP address on specified port
HTTPGetAction: HTTP GET request against container
Probes can have the following results:
- Success
- Failure
- Unknown
or
pods/probe/exec-liveness.yaml apiVersion: v1
kind: Pod
metadata:
labels:
test: liveness
name: liveness-exec
spec:
containers:
- name: liveness
image: k8s.gcr.io/busybox
args:
- /bin/sh
- -c
- touch /tmp/healthy; sleep ; rm -rf /tmp/healthy; sleep
livenessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds:
periodSeconds:
--
最新文章
- 前端构建 build 技术 nodejs gulp
- angular中ng-model,返回数据,拆分数据,展示,名称相同,重新赋值会有冲突
- 函数柯理化以及利用柯理化实现bind方法
- Python 之匿名函数和偏函数
- centos7精简版(minimal)killall: command not found
- 修剪花卉(codevs 1794)
- Java 编译错误:缺少返回语句
- (转载)LINUX UNBUNTU10.04 下 搭建OC编译环境
- Mysql数据库文件、表、记录的增删改查
- Spring ——依赖注入配置一些知识点
- Python异步处理
- Learning part-based templates from large collections of 3D shapse CorrsTmplt Kim 代码调试
- Netty实现高性能IOT服务器(Groza)之精尽代码篇中
- pycharm汉化 (ubuntu版)
- Hbase 学习(六) 配置文件调优
- L-BFGS
- [Openwrt 项目开发笔记]:USB挂载&; U盘启动(三)
- Dubbo学习笔记3:Dubbo管理控制台与监控中心的搭建
- OpenCV学习(32) 求轮廓的包围盒
- Spark累加器