K3s Chaos Mesh 安裝
安裝
官方網站
| 1
 | curl -sSL https://mirrors.chaos-mesh.org/v2.6.3/install.sh | bash -s -- --k3s
 | 
如果中途發生安裝失敗,可以使用解除安裝腳本進行解除安裝
| 12
 
 | curl -sSL https://mirrors.chaos-mesh.org/v2.6.3/install.sh | bash -s -- --template | kubectl delete -f -kubectl delete ns chaos-mesh # 刪除 Namespace
 
 | 
查看資源狀態
| 1
 | kubectl get all -n chaos-mesh
 | 
建立 Ingress
新增一個 ingress.yml
| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 
 | apiVersion: networking.k8s.io/v1kind: 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
 
 | 
啟動 Ingress
| 1
 | kubectl apply -f ingress.yml
 | 
查看 Ingress
| 1
 | kubectl get ingress -n chaos-mesh
 |