cloud-yysj-order-query.yaml 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. apiVersion: v1
  2. kind: Service
  3. metadata:
  4. name: cloud-yysj-order-query
  5. labels:
  6. app: cloud-yysj-order-query
  7. svcEndpoints: actuator
  8. spec:
  9. type: NodePort
  10. ports:
  11. - name: server
  12. port: 8080
  13. targetPort: 8080
  14. - name: management
  15. port: 8081
  16. targetPort: 8081
  17. selector:
  18. app: cloud-yysj-order-query
  19. ---
  20. apiVersion: apps/v1
  21. kind: Deployment
  22. metadata:
  23. name: cloud-yysj-order-query
  24. labels:
  25. app: cloud-yysj-order-query
  26. spec:
  27. replicas: 1
  28. selector:
  29. matchLabels:
  30. app: cloud-yysj-order-query
  31. template:
  32. metadata:
  33. name: cloud-yysj-order-query
  34. labels:
  35. app: cloud-yysj-order-query
  36. spec:
  37. restartPolicy: Always
  38. containers:
  39. - name: service-provider
  40. image: hub.i139.cn/cloud-yysj/cloud-yysj-order-query:1.0.0
  41. imagePullPolicy: IfNotPresent
  42. ports:
  43. - name: server
  44. containerPort: 8080
  45. - name: management
  46. containerPort: 8081
  47. env:
  48. - name: KUBERNETES_NAMESPACE
  49. valueFrom:
  50. fieldRef:
  51. fieldPath: metadata.namespace
  52. - name: POD_NAME
  53. valueFrom:
  54. fieldRef:
  55. fieldPath: metadata.name
  56. - name: JAVA_OPTS
  57. value: ""
  58. - name: APP_OPTS
  59. value: ""
  60. resources:
  61. limits:
  62. memory: 1000Mi
  63. cpu: 2000m
  64. requests:
  65. memory: 256Mi
  66. cpu: 1000m
  67. readinessProbe:
  68. initialDelaySeconds: 20
  69. periodSeconds: 5
  70. timeoutSeconds: 10
  71. failureThreshold: 5
  72. httpGet:
  73. path: /actuator/health
  74. port: 8081
  75. livenessProbe:
  76. initialDelaySeconds: 60
  77. periodSeconds: 5
  78. timeoutSeconds: 5
  79. failureThreshold: 3
  80. httpGet:
  81. path: /actuator/health
  82. port: 8081