cilium / hubble-ui

Observability & Troubleshooting for Kubernetes Services
https://www.cilium.io
Apache License 2.0
394 stars 62 forks source link

helm: hubble-ui.ingress.path is not working with Hubble UI #154

Closed geakstr closed 1 year ago

geakstr commented 3 years ago

Origin: https://github.com/cilium/cilium/issues/13182

alex-berger commented 2 years ago

We also want to host hubble-ui under a path prefix (e.g. /hubble).

simion commented 2 years ago

We also need to expose hubble under our-domain.com/hubble. Any progres on this, or some other workarounds?

rahgadda commented 2 years ago

I tried with the below but not working

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: hubble-ui
  namespace: cilium
  annotations:
    kubernetes.io/ingress.class: nginx
    # bug https://github.com/cilium/hubble-ui/issues/154
    nginx.ingress.kubernetes.io/rewrite-target: /$2
    # nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/configuration-snippet: |
        rewrite (^\/icons.*$)|(^\/bundle.*$) /hubble$uri permanent;
    # nginx.ingress.kubernetes.io/configuration-snippet: |
    #       rewrite ^(?:(?!\/hubble).)*$ /hubble$uri permanent;
spec:
  rules:
    - host: xx-xx-cluster.ml
      http:
        paths:
          - path: /hubble(/|$)(.*)
          # - path: /
          #- path: /hubble
            pathType: Prefix
            backend:
              service:
                name: hubble-ui
                port:
                  number: 8081
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  annotations:
    kubernetes.io/ingress.class: nginx
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
    nginx.ingress.kubernetes.io/backend-protocol: GRPC
    nginx.ingress.kubernetes.io/configuration-snippet: |
      grpc_next_upstream error timeout http_502 http_503 http_504 non_idempotent;
      grpc_next_upstream_tries 3;
      rewrite (^\/api.*$) /hubble/api$uri permanent;
  name: hubble-grpc
  namespace: cilium
spec:
  rules:
  - host: xx-xx-cluster.ml
    http:
      paths:
      - backend:
          service:
            name: hubble-ui
            port:
              number: 8081
        path: /api(/|$)(.*)
        pathType: Prefix

image

fly3366 commented 1 year ago

/assgin

CiraciNicolo commented 1 year ago

Is this stale?