miweb-deployment.yaml 941 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: miweb
  5. namespace: miweb
  6. spec:
  7. type: NodePort
  8. ports:
  9. - name: http
  10. port: 80
  11. nodePort: 30080
  12. targetPort: miweb-http
  13. selector:
  14. app: miweb
  15. ---
  16. apiVersion: apps/v1
  17. kind: Deployment
  18. metadata:
  19. name: miweb
  20. namespace: miweb
  21. labels:
  22. app: miweb
  23. spec:
  24. selector:
  25. matchLabels:
  26. app: miweb
  27. tier: frontend
  28. strategy:
  29. type: Recreate
  30. template:
  31. metadata:
  32. labels:
  33. app: miweb
  34. tier: frontend
  35. spec:
  36. containers:
  37. - name: miweb
  38. image: harbor.reymota.es/sistema/phpmysql:2.0
  39. ports:
  40. - containerPort: 80
  41. name: "miweb-http"
  42. volumeMounts:
  43. - name: miweb-www-folder
  44. mountPath: /var/www/html
  45. imagePullSecrets:
  46. - name: reg-cred-secret
  47. volumes:
  48. - name: miweb-www-folder
  49. persistentVolumeClaim:
  50. claimName: miweb-pv-claim