[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:内置比较丰富的Linux命令,方便测试
最新推荐文章于 2025-04-04 21:34:42 发布