21 lines
458 B
YAML
21 lines
458 B
YAML
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: pod-with-healthcheck
|
|
spec:
|
|
containers:
|
|
- name: nginx
|
|
image: nginx
|
|
# defines the health checking
|
|
livenessProbe:
|
|
# an http probe
|
|
httpGet:
|
|
path: /_status/healthz
|
|
port: 80
|
|
# length of time to wait for a pod to initialize
|
|
# after pod startup, before applying health checking
|
|
initialDelaySeconds: 30
|
|
timeoutSeconds: 1
|
|
ports:
|
|
- containerPort: 80
|