Skip to content

Commit

Permalink
docs: Expose Chaos Dashbaord with Ingress
Browse files Browse the repository at this point in the history
Signed-off-by: Yue Yang <g1enyy0ung@gmail.com>
  • Loading branch information
g1eny0ung committed Aug 23, 2023
1 parent 6dbf849 commit e65524d
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/expose-dashboard-with-ingress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Expose Chaos Dashbaord with Ingress

At times, you may need to make the Chaos Dashboard accessible to external users, while placing it under the subpath of your current monitoring dashboard.

Below is an example of how to expose the Chaos Dashboard under the path `/chaos-mesh`:

```yaml
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
```
You can also find this example in <https://github.com/chaos-mesh/chaos-mesh/blob/master/examples/dashboard/ingress-subpath.yaml>.
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
'quick-start',
'production-installation-using-helm',
'offline-installation',
'expose-dashboard-with-ingress',
'persistence-dashboard',
'uninstallation',
{
Expand Down
31 changes: 31 additions & 0 deletions versioned_docs/version-2.6.1/expose-dashboard-with-ingress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Expose Chaos Dashbaord with Ingress

At times, you may need to make the Chaos Dashboard accessible to external users, while placing it under the subpath of your current monitoring dashboard.

Below is an example of how to expose the Chaos Dashboard under the path `/chaos-mesh`:

```yaml
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
```
You can also find this example in <https://github.com/chaos-mesh/chaos-mesh/blob/master/examples/dashboard/ingress-subpath.yaml>.
1 change: 1 addition & 0 deletions versioned_sidebars/version-2.6.1-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"quick-start",
"production-installation-using-helm",
"offline-installation",
"expose-dashboard-with-ingress",
"persistence-dashboard",
"uninstallation",
{
Expand Down

0 comments on commit e65524d

Please sign in to comment.