#!/bin/bash

# curl -sSL https://mirrors.chaos-mesh.org/v2.0.1/install.sh | bash
kubectl create namespace chaos-mesh
helm repo add chaos-mesh https://charts.chaos-mesh.org
helm install chaos-mesh chaos-mesh/chaos-mesh \
  --version v2.0.0 \
  --namespace chaos-mesh \
  --set dashboard.securityMode=false
kubectl apply -f /home/centos/demos/high_availability/files_k8s/chaosmesh_dashboard.yaml.template -n chaos-mesh
URL=$(kubectl get ingress chaosmesh-dashboard -n chaos-mesh --no-headers -o custom-columns=ADDRESS:.status.loadBalancer.ingress[0].hostname)
echo "chaosmesh_dashboard_url=$URL/chaosmesh"
