k 8 sでbusyboxを起動
621 ワード
1、busyboxのyamlファイルを直接与える
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: app
spec:
replicas: 10
template:
metadata:
labels:
run: app
spec:
containers:
- name: app
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