deployment.yaml 988 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: diagnosis-frontend
  5. namespace: dev
  6. labels:
  7. app: diagnosis-frontend
  8. spec:
  9. replicas: 1
  10. revisionHistoryLimit: 10
  11. selector:
  12. matchLabels:
  13. app: diagnosis-frontend
  14. strategy:
  15. rollingUpdate:
  16. maxSurge: 1
  17. maxUnavailable: 0
  18. type: RollingUpdate
  19. template:
  20. metadata:
  21. labels:
  22. app: diagnosis
  23. spec:
  24. containers:
  25. - args:
  26. - --spring.profiles.active=dev
  27. image: yaoxiang/diagnosis-frontend:${date}
  28. imagePullPolicy: IfNotPresent
  29. name: diagnosis-frontend
  30. ports:
  31. - containerPort: 80
  32. name: 80tcp01
  33. protocol: TCP
  34. ---
  35. apiVersion: v1
  36. kind: Service
  37. metadata:
  38. name: diagnosis-frontend
  39. namespace: dev
  40. labels:
  41. app: diagnosis-frontend
  42. spec:
  43. selector:
  44. app: diagnosis-frontend
  45. type: ClusterIP
  46. ports:
  47. - port: 80
  48. targetPort: 80
  49. name: "http"
  50. protocol: TCP