Advertisement
sergio_educacionit

wordpress-dp.yaml

Sep 1st, 2023
1,136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.88 KB | None | 0 0
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4.   name: wordpress
  5.   labels:
  6.     app: wordpress
  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: wordpress:4.8-apache
  20.         name: wordpress
  21.         env:
  22.         - name: WORDPRESS_DB_HOST
  23.           value: wordpress-mysql
  24.         - name: WORDPRESS_DB_PASSWORD
  25.           valueFrom:
  26.             secretKeyRef:
  27.               name: mysql-pass-99bf8m65t5
  28.               key: password
  29.         ports:
  30.         - containerPort: 80
  31.           name: wordpress
  32.         volumeMounts:
  33.         - name: wordpress-persistent-storage
  34.           mountPath: /var/www/html
  35.       volumes:
  36.       - name: wordpress-persistent-storage
  37.         persistentVolumeClaim:
  38.           claimName: wordpress-pv
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement