deployment-prod.yaml 940 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. name: diagnosis-frontend
  5. namespace: prod
  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-frontend
  23. spec:
  24. containers:
  25. - image: yaoxiang/diagnosis-frontend:${date}
  26. imagePullPolicy: IfNotPresent
  27. name: diagnosis-frontend
  28. ports:
  29. - containerPort: 80
  30. name: 80tcp01
  31. protocol: TCP
  32. ---
  33. apiVersion: v1
  34. kind: Service
  35. metadata:
  36. name: diagnosis-frontend
  37. namespace: prod
  38. labels:
  39. app: diagnosis-frontend
  40. spec:
  41. selector:
  42. app: diagnosis-frontend
  43. type: ClusterIP
  44. ports:
  45. - port: 80
  46. targetPort: 80
  47. name: "http"
  48. protocol: TCP