Skip to content

Commit 3a119fe

Browse files
committed
Update deployment yaml file to match with the one on tutorial page
Refer to this tutorial: https://kubernetes.io/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/
1 parent 4741d4f commit 3a119fe

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

mysql-wordpress-pd/mysql-deployment.yaml

+11-5
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ spec:
2525
requests:
2626
storage: 20Gi
2727
---
28-
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
28+
apiVersion: apps/v1
2929
kind: Deployment
3030
metadata:
3131
name: wordpress-mysql
@@ -45,17 +45,23 @@ spec:
4545
tier: mysql
4646
spec:
4747
containers:
48-
- image: mysql:5.6
48+
- image: mysql:8.0
4949
name: mysql
5050
env:
5151
- name: MYSQL_ROOT_PASSWORD
5252
valueFrom:
5353
secretKeyRef:
5454
name: mysql-pass
5555
key: password
56-
livenessProbe:
57-
tcpSocket:
58-
port: 3306
56+
- name: MYSQL_DATABASE
57+
value: wordpress
58+
- name: MYSQL_USER
59+
value: wordpress
60+
- name: MYSQL_PASSWORD
61+
valueFrom:
62+
secretKeyRef:
63+
name: mysql-pass
64+
key: password
5965
ports:
6066
- containerPort: 3306
6167
name: mysql

mysql-wordpress-pd/wordpress-deployment.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ spec:
2525
requests:
2626
storage: 20Gi
2727
---
28-
apiVersion: apps/v1 # for k8s versions before 1.9.0 use apps/v1beta2 and before 1.8.0 use extensions/v1beta1
28+
apiVersion: apps/v1
2929
kind: Deployment
3030
metadata:
3131
name: wordpress
@@ -45,7 +45,7 @@ spec:
4545
tier: frontend
4646
spec:
4747
containers:
48-
- image: wordpress:4.8-apache
48+
- image: wordpress:6.2.1-apache
4949
name: wordpress
5050
env:
5151
- name: WORDPRESS_DB_HOST
@@ -55,6 +55,8 @@ spec:
5555
secretKeyRef:
5656
name: mysql-pass
5757
key: password
58+
- name: WORDPRESS_DB_USER
59+
value: wordpress
5860
ports:
5961
- containerPort: 80
6062
name: wordpress

0 commit comments

Comments
 (0)