ingress.yaml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. apiVersion: networking.k8s.io/v1
  2. kind: Ingress
  3. metadata:
  4. name: ob-server
  5. namespace: observe
  6. annotations:
  7. nginx.ingress.kubernetes.io/enable-cors: "true"
  8. nginx.ingress.kubernetes.io/cors-allow-origin: "*"
  9. nginx.ingress.kubernetes.io/proxy-cache: "true"
  10. nginx.ingress.kubernetes.io/proxy-cache-path: "/tmp/nginx-cache"
  11. nginx.ingress.kubernetes.io/proxy-cache-methods: "GET,HEAD,POST"
  12. nginx.ingress.kubernetes.io/proxy-cache-min_uses: "1"
  13. nginx.ingress.kubernetes.io/proxy-cache-lock: "on"
  14. nginx.ingress.kubernetes.io/proxy-cache-valid: "10m"
  15. nginx.ingress.kubernetes.io/proxy-cache-max-size: "100m"
  16. spec:
  17. rules:
  18. - host: observe-server.cestong.com.cn
  19. http:
  20. paths:
  21. - path: /
  22. pathType: Prefix
  23. backend:
  24. service:
  25. name: ob-server
  26. port:
  27. number: 80
  28. - path: /pprof
  29. pathType: Prefix
  30. backend:
  31. service:
  32. name: ob-server
  33. port:
  34. number: 81
  35. ingressClassName: nginx