cloud-yysj-login-authentication.yaml 2.0 KB

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