mirror of
https://github.com/amkartashov/gf-k8s.git
synced 2026-01-11 09:59:43 +00:00
mysql: PVC -> hostPath
This commit is contained in:
parent
26f14db943
commit
9a39c369b2
1 changed files with 5 additions and 35 deletions
40
mysql.yaml
40
mysql.yaml
|
|
@ -1,37 +1,4 @@
|
|||
---
|
||||
kind: PersistentVolume
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: mariadb
|
||||
labels:
|
||||
type: local
|
||||
name: mariadb
|
||||
spec:
|
||||
storageClassName: manual
|
||||
capacity:
|
||||
storage: 5Gi
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
hostPath:
|
||||
path: /data/mariadb
|
||||
# mkdir -p /data/mariadb
|
||||
# chown 999.999 /data/mariadb
|
||||
---
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: mariadb
|
||||
spec:
|
||||
storageClassName: manual
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
resources:
|
||||
requests:
|
||||
storage: 5Gi
|
||||
selector:
|
||||
matchLabels:
|
||||
name: mariadb
|
||||
---
|
||||
apiVersion: apps/v1beta2
|
||||
kind: Deployment
|
||||
metadata:
|
||||
|
|
@ -49,9 +16,12 @@ spec:
|
|||
app: mariadb
|
||||
spec:
|
||||
volumes:
|
||||
# mkdir -p /data/mariadb
|
||||
# chown 999.999 /data/mariadb
|
||||
- name: mariadb
|
||||
persistentVolumeClaim:
|
||||
claimName: mariadb
|
||||
hostPath:
|
||||
path: /data/mariadb
|
||||
type:
|
||||
containers:
|
||||
- name: mariadb
|
||||
image: mariadb
|
||||
|
|
|
|||
Loading…
Reference in a new issue