Advertisement
sergio_educacionit

mysql-dp.yaml

Sep 1st, 2023
993
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.79 KB | None | 0 0
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4.   name: mysql
  5.   labels:
  6.     app: wordpress-mysql
  7. spec:
  8.   selector:
  9.     matchLabels:
  10.       app: wordpress
  11.   strategy:
  12.     type: Recreate
  13.   template:
  14.     metadata:
  15.       labels:
  16.         app: wordpress
  17.     spec:
  18.       containers:
  19.       - image: mysql:latest
  20.         name: mysql
  21.         env:
  22.         - name: MYSQL_ROOT_PASSWORD
  23.           valueFrom:
  24.             secretKeyRef:
  25.               name: mysql-pass-99bf8m65t5
  26.               key: password
  27.         ports:
  28.         - containerPort: 3306
  29.           name: mysql
  30.         volumeMounts:
  31.         - name: mysql-persistent-storage
  32.           mountPath: /var/lib/mysql
  33.       volumes:
  34.       - name: mysql-persistent-storage
  35.         persistentVolumeClaim:
  36.           claimName: mysql-pv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement