arshad75

pv-mysql.yaml

Apr 15th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: mysql-<your-name>
  5. labels:
  6. app: mysql-<your-name>
  7. spec:
  8. replicas: 1
  9. selector:
  10. matchLabels:
  11. app: mysql-<your-name>
  12. template:
  13. metadata:
  14. labels:
  15. app: mysql-<your-name>
  16. spec:
  17. containers:
  18. - image: mysql:5.6
  19. name: mysql-<your-name>
  20. env:
  21. - name: MYSQL_ROOT_PASSWORD
  22. valueFrom:
  23. secretKeyRef:
  24. name: mysql-<your-name>
  25. key: password
  26. ports:
  27. - containerPort: 3306
  28. name: mysql-<your-name>
  29. volumeMounts:
  30. - name: mysql-persistent-storage-<your-name>
  31. mountPath: /var/lib/mysql
  32. volumes:
  33. - name: mysql-persistent-storage-<your-name>
  34. persistentVolumeClaim:
  35. claimName: mysql-volumeclaim-<your-name>
Add Comment
Please, Sign In to add comment