* Deploy Virtual Bussiness card.

76 lines
1.3 KiB

  1. ---
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: hommer
  6. labels:
  7. app: hommer
  8. spec:
  9. selector:
  10. matchLabels:
  11. app: hommer
  12. replicas: 1 # You could also consider elastic scaling for this deployment
  13. template:
  14. metadata:
  15. labels:
  16. app: hommer
  17. spec:
  18. containers:
  19. - name: hommer
  20. image: b4bz/homer:v23.09.1
  21. volumeMounts:
  22. - name: assets
  23. mountPath: /www/assets
  24. ports:
  25. - containerPort: 8080
  26. volumes:
  27. - name: assets
  28. persistentVolumeClaim:
  29. claimName: assets-claim
  30. ---
  31. apiVersion: v1
  32. kind: PersistentVolumeClaim
  33. metadata:
  34. name: assets-claim
  35. namespace: default
  36. spec:
  37. storageClassName: manual
  38. volumeMode: Filesystem
  39. accessModes:
  40. - ReadWriteOnce
  41. resources:
  42. requests:
  43. storage: 1Gi
  44. volumeName: hommer-pv
  45. ---
  46. apiVersion: v1
  47. kind: PersistentVolume
  48. metadata:
  49. name: hommer-pv
  50. labels:
  51. type: local
  52. spec:
  53. capacity:
  54. storage: 1Gi
  55. accessModes:
  56. - ReadWriteOnce
  57. persistentVolumeReclaimPolicy: Retain
  58. storageClassName: manual
  59. hostPath:
  60. path: "/home/ubuntu/hommer/assets"
  61. ---
  62. apiVersion: v1
  63. kind: Service
  64. metadata:
  65. name: hommer-dashboard
  66. spec:
  67. selector:
  68. app: hommer
  69. ports:
  70. - port: 82
  71. targetPort: 8080