-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp-deploy.yml
84 lines (78 loc) · 1.38 KB
/
app-deploy.yml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
apiVersion: v1
kind: PersistentVolume
metadata:
name: mysql-local
labels:
type: mysql-local
spec:
capacity:
storage: 100Mi
accessModes:
- ReadWriteOnce
storageClassName: mysql-local
hostPath:
path: /meubanco/
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: mysql-local
spec:
storageClassName: mysql-local
resources:
requests:
storage: 100Mi
accessModes:
- ReadWriteOnce
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: mysql
spec:
selector:
matchLabels:
app: mysql
template:
metadata:
labels:
app: mysql
spec:
containers:
- name: mysql
image: bportilho/projetok8s-database:1.0
args:
- "--ignore-db-dir=lost+found"
imagePullPolicy: Always
ports:
- containerPort: 3306
volumeMounts:
- name: mysql-local
mountPath: /var/lib/mysql
volumes:
- name: mysql-local
persistentVolumeClaim:
claimName: mysql-local
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: php
labels:
app: php
spec:
replicas: 6
selector:
matchLabels:
app: php
template:
metadata:
labels:
app: php
spec:
containers:
- name: php
image: bportilho/projetok8s-backend:1.0
imagePullPolicy: Always
ports:
- containerPort: 80