mirror of
https://github.com/amkartashov/gf-k8s.git
synced 2026-01-11 18:09:44 +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
|
apiVersion: apps/v1beta2
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
|
|
@ -49,9 +16,12 @@ spec:
|
||||||
app: mariadb
|
app: mariadb
|
||||||
spec:
|
spec:
|
||||||
volumes:
|
volumes:
|
||||||
|
# mkdir -p /data/mariadb
|
||||||
|
# chown 999.999 /data/mariadb
|
||||||
- name: mariadb
|
- name: mariadb
|
||||||
persistentVolumeClaim:
|
hostPath:
|
||||||
claimName: mariadb
|
path: /data/mariadb
|
||||||
|
type:
|
||||||
containers:
|
containers:
|
||||||
- name: mariadb
|
- name: mariadb
|
||||||
image: mariadb
|
image: mariadb
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue