forked from rjonala/argocd-wordpress-rds
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwordpress.yaml
68 lines (68 loc) · 1.56 KB
/
wordpress.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
67
68
apiVersion: v1
kind: Service
metadata:
name: wordpress-rds
labels:
app: wordpress-rds
spec:
ports:
- port: 80
selector:
app: wordpress-rds
tier: frontend-rds
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: wp-pv-claim-rds
labels:
app: wordpress-rds
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 5Gi
---
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
kind: Deployment
metadata:
name: wordpress-rds
labels:
app: wordpress-rds
spec:
selector:
matchLabels:
app: wordpress-rds
tier: frontend-rds
strategy:
type: Recreate
replicas: 3
template:
metadata:
labels:
app: wordpress-rds
tier: frontend-rds
spec:
containers:
- image: wordpress:5.7.0-apache
name: wordpress-rds
env:
- name: WORDPRESS_DB_HOST
value: devopsinterview.cw7qgk28g9tl.us-east-1.rds.amazonaws.com
- name: WORDPRESS_DB_NAME
value: devopsinterview
- name: WORDPRESS_DB_USER
value: devopsinterview
- name: WORDPRESS_DB_PASSWORD
value: d3v0ps-1nt3rv13w
ports:
- containerPort: 80
name: wordpress-rds
volumeMounts:
- name: wordpress-rds-persistent-storage
mountPath: /var/www/html
volumes:
- name: wordpress-rds-persistent-storage
persistentVolumeClaim:
claimName: wp-pv-claim-rds