[root@k8s-n0 busybox]# cat deploy.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: busybox
namespace: dmgeo-lib
spec:
replicas: 1
selector:
matchLabels:
app: busybox
template:
metadata:
labels:
app: busybox
spec:
containers:
- name: busybox
image: busybox #内置的linux大多数命令,多用于测试
args:
- /bin/sh
- -c
- sleep 10; touch /tmp/healthy; sleep 30000
readinessProbe: #就绪探针
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 10 #10s之后开始第一次探测
periodSeconds: 5 #第一次探测之后每隔5s探测一次
k8s部署busybox容器
最新推荐文章于 2024-06-28 16:38:11 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)