Aller au contenu principal
Version : Suivant

Exposer le Chaos Dashboard avec Ingress

Traduction Bêta Non Officielle

Cette page a été traduite par PageTurner AI (bêta). Non approuvée officiellement par le projet. Vous avez trouvé une erreur ? Signaler un problème →

Parfois, vous pouvez avoir besoin de rendre le Chaos Dashboard accessible à des utilisateurs externes tout en le plaçant sous le sous-chemin de votre tableau de bord de surveillance actuel.

Voici un exemple montrant comment exposer le Chaos Dashboard sous le chemin /chaos-mesh :

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress-chaos-dashboard-under-subpath
namespace: chaos-mesh
annotations:
nginx.ingress.kubernetes.io/use-regex: 'true'
nginx.ingress.kubernetes.io/rewrite-target: /$1
nginx.ingress.kubernetes.io/configuration-snippet: |
sub_filter '<head>' '<head> <base href="/chaos-mesh/">';
spec:
rules:
- http:
paths:
- path: /chaos-mesh/?(.*)
pathType: Prefix
backend:
service:
name: chaos-dashboard
port:
number: 2333

Vous pouvez également trouver cet exemple sur https://github.com/chaos-mesh/chaos-mesh/blob/master/examples/dashboard/ingress-subpath.yaml.