Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- apiVersion: v1
- kind: Service
- metadata:
- name: mariadb
- spec:
- type: NodePort
- ports:
- - port: 3306
- selector:
- app: mariadb
- ---
- apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: mariadb
- spec:
- selector:
- matchLabels:
- app: mariadb
- strategy:
- type: Recreate
- template:
- metadata:
- labels:
- app: mariadb
- spec:
- containers:
- - image: mariadb:latest
- name: mariadb
- env:
- - name: MYSQL_ROOT_PASSWORD
- value: secret
- ports:
- - containerPort: 3306
- name: mariadb
- volumeMounts:
- - name: mariadb-persistent-storage
- mountPath: /var/lib/mysql
- volumes:
- - name: mariadb-persistent-storage
- persistentVolumeClaim:
- claimName: mariadb-pv-claim
Add Comment
Please, Sign In to add comment