-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy patharticle-api.yaml
61 lines (60 loc) · 1.2 KB
/
article-api.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
50
51
52
53
54
55
56
57
58
59
60
61
apiVersion: apps/v1
kind: Deployment
metadata:
name: article-api
namespace: beyond
labels:
app: article-api
spec:
replicas: 1
revisionHistoryLimit: 5
selector:
matchLabels:
app: article-api
template:
metadata:
labels:
app: article-api
spec:
serviceAccountName: endpoints-reader
containers:
- name: article-api
image: article-api:v1.0.0
ports:
- containerPort: 80
readinessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
tcpSocket:
port: 80
initialDelaySeconds: 15
periodSeconds: 20
resources:
requests:
cpu: 200m
memory: 256Mi
limits:
cpu: 200m
memory: 256Mi
volumeMounts:
- name: timezone
mountPath: /etc/localtime
volumes:
- name: timezone
hostPath:
path: /usr/share/zoneinfo/Asia/Shanghai
---
apiVersion: v1
kind: Service
metadata:
name: article-api-svc
namespace: beyond
spec:
ports:
- port: 80
targetPort: 80
selector:
app: article-api