-
Notifications
You must be signed in to change notification settings - Fork 0
/
api-client.yaml
49 lines (49 loc) · 1.12 KB
/
api-client.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
apiVersion: v1
kind: Service
metadata:
name: kubernetes-api-client
labels:
app: kubernetes-tp
spec:
ports:
- port: 3000
targetPort: 3000
selector:
app: kubernetes-tp
partie: kubernetes-api-client
type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: kubernetes-api-client
labels:
app: kubernetes-tp
spec:
template:
spec:
containers:
- name: kubernetes-api-client
image: pfourny/kubernetes-tp-api-client:latest
ports:
- containerPort: 3000
readinessProbe:
failureThreshold: 5 # Reessayer 5 fois
httpGet:
path: /ping
port: 3000
scheme: HTTP
initialDelaySeconds: 30 # Attendre 30s avant de tester
periodSeconds: 10 # Attendre 10s entre chaque essai
timeoutSeconds: 5 # Attendre 5s la reponse
metadata:
labels:
app: kubernetes-tp
partie: kubernetes-api-client
selector:
matchLabels:
app: kubernetes-tp
partie: kubernetes-api-client
strategy:
type: Recreate
replicas: 1