arshad75

pv-deployment.yaml

Jan 16th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: <your-name>-deployment
  5. spec:
  6. selector:
  7. matchLabels:
  8. app: <your-name>-app
  9. replicas: 1 # tells deployment to run 2 pods matching the template
  10. template:
  11. metadata:
  12. labels:
  13. app: <your-name>-app
  14. spec:
  15. containers:
  16. - name: <your-name>-container
  17. image: <docker-hub-image>/image:tag> #ex : asyed755/ril:v1 - it should be the same as on docker hub
  18. ports:
  19. - containerPort: 80
  20. volumes:
  21. - name: <your-name>
  22. persistentVolumeClaim:
  23. claimName: <your-name>-persistentvolumeclaim
Add Comment
Please, Sign In to add comment