class notes
apiVersion: v1
kind: Pod
metadata:
labels:
test: readiness
name: readiness-exec
spec:
containers:
- name: readiness
image: k9s.gcr.io/busybox
args:
- /bin/sh
- -c
- touch /tmp/healthy, sleep 30; rm -rf /tmp/healthy; sleep 600
readinessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 5
periodSeconds: 5
kc apply -f exec_readiness_probe.yaml
kc get pods
kc describe readiness-exec
spec:
containers:
- name: goproxy
image: k8s.gcr.io/goproxy:0.1
ports:
- containerPort: 8080
readinessProbe:
tcpSocket:
port: 8080
initialDelaySeconds: 5
args:
- /bin/sh
- -c
- touch /tmp/healthy, sleep 30; rm -rf /tmp/healthy; sleep 600
readinessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 5
periodSeconds: 5
kc apply -f exec_readiness_probe.yaml
kc get pods
kc describe readiness-exec
===================
when to use
if your login page coming, jenkins is ready,
if you want to test every features, they put they strategy or file, or check stable, security implementation, scema then u use limeness ...
No comments:
Post a Comment