-
Notifications
You must be signed in to change notification settings - Fork 1
/
nextcloud.yml
90 lines (86 loc) · 1.67 KB
/
nextcloud.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
85
86
87
88
89
90
apiVersion: v1
kind: Service
metadata:
name: nextcloud
labels:
app: nextcloud
spec:
ports:
- port: 80
selector:
app: nextcloud
type: LoadBalancer
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: nextcloud-pvc
annotations:
volume.beta.kubernetes.io/storage-class: "aws-efs"
labels:
app: nextcloud
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 20Gi
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: nextcloud-pv
labels:
app: nextcloud
annotations:
volume.beta.kubernetes.io/storage-class: "aws-efs"
spec:
storageClassName: "aws-efs"
capacity:
storage: 40Gi
accessModes:
- ReadWriteMany
volumeMode: Filesystem
nfs:
server: fs-a7dc5676.efs.ap-south-1.amazonaws.com
path: /
---
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2
kind: Deployment
metadata:
name: nextcloud
labels:
app: nextcloud
spec:
selector:
matchLabels:
app: nextcloud
strategy:
type: Recreate
template:
metadata:
labels:
app: nextcloud
spec:
containers:
- image: nextcloud
name: nextcloud
env:
- name: MYSQL_HOST
value: nextcloud-mysql-db
- name: MYSQL_DATABASE
value: mysqldb
- name: MYSQL_USER
value: ninad
- name: MYSQL_PASSWORD
value: sqlpass
ports:
- containerPort: 80
name: nextcloud
volumeMounts:
- name: nextcloud-persistent-storage
mountPath: /var/www/html
volumes:
- name: nextcloud-persistent-storage
persistentVolumeClaim:
claimName: nextcloud-pvc