deployment.yaml 936 B

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