-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfitcycle-server-total.yaml
66 lines (64 loc) · 1.3 KB
/
fitcycle-server-total.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
62
63
64
65
66
apiVersion: v1
kind: Service
metadata:
name: fitcycle-web
labels:
app: fitcycle
spec:
ports:
- port: 8000
name: http-fc-web
nodePort: 30440
selector:
app: fitcycle
tier: app
type: NodePort
---
apiVersion: apps/v1beta1 # for versions before 1.8.0 use apps/v1beta1
kind: Deployment
metadata:
name: fitcycle-server
labels:
app: fitcycle
spec:
selector:
matchLabels:
app: fitcycle
tier: app
strategy:
type: Recreate
template:
metadata:
labels:
app: fitcycle
tier: app
spec:
volumes:
- name: varlog
emptyDir: {}
containers:
- image: gcr.io/learning-containers-187204/web-server0901:latest
name: fitcycle-server
env:
- name: MYSQL_ID
value: "root"
- name: MYSQL_PASSWORD
valueFrom:
secretKeyRef:
name: mysql-pass
key: password
- name: MYSQL_SERVER
value: fitcycle-mysql
ports:
- containerPort: 8000
name: fitcycle-server
volumeMounts:
- name: varlog
mountPath: /var/log
resources:
requests:
memory: "64Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "500m"