42 lines
846 B
YAML
42 lines
846 B
YAML
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
name: numbers-api
|
||
|
labels:
|
||
|
kiamol: ch12
|
||
|
spec:
|
||
|
replicas: 2
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: numbers-api
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: numbers-api
|
||
|
version: v3
|
||
|
spec:
|
||
|
restartPolicy: Always
|
||
|
containers:
|
||
|
- name: api
|
||
|
image: kiamol/ch03-numbers-api
|
||
|
ports:
|
||
|
- containerPort: 80
|
||
|
name: api
|
||
|
env:
|
||
|
- name: FailAfterCallCount
|
||
|
value: "1"
|
||
|
readinessProbe:
|
||
|
httpGet:
|
||
|
path: /healthz
|
||
|
port: 80
|
||
|
periodSeconds: 5
|
||
|
livenessProbe:
|
||
|
httpGet:
|
||
|
path: /healthz
|
||
|
port: 80
|
||
|
periodSeconds: 10
|
||
|
initialDelaySeconds: 10
|
||
|
failureThreshold: 2
|
||
|
|
||
|
|