install-services.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # make sure to have kind installed. Use one script options under infrastructure folder
  2. apiVersion: apps/v1
  3. kind: Deployment
  4. metadata:
  5. name: backend-service
  6. spec:
  7. selector:
  8. matchLabels:
  9. app: backend-service
  10. template:
  11. metadata:
  12. labels:
  13. app: backend-service
  14. spec:
  15. containers:
  16. - name: backend-service
  17. image: localhost:5000/backend-service:latest
  18. imagePullPolicy: Always
  19. env:
  20. - name: spring.profiles.active
  21. value: kubernetes
  22. resources:
  23. requests:
  24. memory: "256Mi"
  25. cpu: "100m"
  26. limits:
  27. memory: "512Mi"
  28. cpu: "500m"
  29. livenessProbe:
  30. httpGet:
  31. path: /actuator/health/liveness
  32. port: 8080
  33. scheme: HTTP
  34. successThreshold: 1
  35. readinessProbe:
  36. httpGet:
  37. path: /actuator/health/readiness
  38. port: 8080
  39. scheme: HTTP
  40. ---
  41. kind: Service
  42. apiVersion: v1
  43. metadata:
  44. name: backend-service
  45. spec:
  46. selector:
  47. app: backend-service
  48. ports:
  49. # Default port used by the image
  50. - port: 8080
  51. ---
  52. apiVersion: apps/v1
  53. kind: Deployment
  54. metadata:
  55. name: frontend-service
  56. spec:
  57. selector:
  58. matchLabels:
  59. app: frontend-service
  60. template:
  61. metadata:
  62. labels:
  63. app: frontend-service
  64. spec:
  65. containers:
  66. - name: frontend-service
  67. image: localhost:5000/frontend-service:latest
  68. imagePullPolicy: Always
  69. env:
  70. - name: spring.profiles.active
  71. value: kubernetes
  72. resources:
  73. requests:
  74. memory: "256Mi"
  75. cpu: "100m"
  76. limits:
  77. memory: "512Mi"
  78. cpu: "500m"
  79. livenessProbe:
  80. httpGet:
  81. path: /actuator/health/liveness
  82. port: 8080
  83. scheme: HTTP
  84. successThreshold: 1
  85. readinessProbe:
  86. httpGet:
  87. path: /actuator/health/readiness
  88. port: 8080
  89. scheme: HTTP
  90. ---
  91. kind: Service
  92. apiVersion: v1
  93. metadata:
  94. name: frontend-service
  95. spec:
  96. selector:
  97. app: frontend-service
  98. ports:
  99. # Default port used by the image
  100. - port: 8080