-
Notifications
You must be signed in to change notification settings - Fork 5
/
istio_run.sh
20 lines (20 loc) · 1.09 KB
/
istio_run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
curl -L https://istio.io/downloadIstio | sh -
export PASTA=$(ls | grep istio-)
cd $PASTA && export PATH=$PWD/bin:$PATH
istioctl install -y --set profile=demo
kubectl create -f samples/addons
kubectl label namespace default istio-injection=enabled
sleep 2
kubectl get pod -n istio-system
kubectl patch svc kiali -n istio-system -p '{"spec": {"type": "NodePort"}}' && kubectl get svc kiali -n istio-system
kubectl patch svc prometheus -n istio-system -p '{"spec": {"type": "NodePort"}}' && kubectl get svc prometheus -n istio-system
kubectl patch svc grafana -n istio-system -p '{"spec": {"type": "NodePort"}}' && kubectl get svc grafana -n istio-system
# Acesso ao Kiali
export INGRESS_HOST=$(curl -s checkip.amazonaws.com)
export INGRESS_PORT=$(kubectl -n istio-system get service kiali -o jsonpath='{.spec.ports[?(@.name=="http")].nodePort}')
echo "Acessar Istio Kiali: http://$INGRESS_HOST:$INGRESS_PORT"
echo ""
# Acesso ao Grafana
export INGRESS_PORT=$(kubectl -n istio-system get service grafana -o jsonpath='{.spec.ports[?()].nodePort}')
echo "Acessar Grafana: http://$INGRESS_HOST:$INGRESS_PORT"
echo ""