pipeline.yaml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. apiVersion: apps/v1
  2. kind: Deployment
  3. metadata:
  4. namespace: test
  5. name: pipleline
  6. labels:
  7. app: pipleline
  8. spec:
  9. replicas: 2
  10. selector:
  11. matchLabels:
  12. app: pipleline
  13. template:
  14. metadata:
  15. labels:
  16. app: pipleline
  17. spec:
  18. containers:
  19. - name: pipleline
  20. image: 192.168.0.5:9080/repo/pipeline:v1.0.0
  21. imagePullPolicy: Always
  22. ports:
  23. - containerPort: 8080
  24. ---
  25. apiVersion: v1
  26. kind: Service
  27. metadata:
  28. namespace: test
  29. labels:
  30. app: pipleline
  31. name: pipleline
  32. spec:
  33. selector:
  34. app: pipleline
  35. ports:
  36. - port: 18081
  37. targetPort: 8080
  38. type: ClusterIP
  39. ---
  40. apiVersion: networking.k8s.io/v1
  41. kind: Ingress
  42. metadata:
  43. name: pipeline
  44. namespace: test
  45. spec:
  46. ingressClassName: traefik
  47. rules:
  48. - host: pipeline.autumn.com
  49. http:
  50. paths:
  51. - path: /pipeline/api/v1
  52. pathType: Prefix
  53. backend:
  54. service:
  55. name: pipleline
  56. port:
  57. number: 18081