Skip to content

Commit 286d257

Browse files
committed
feat(istio): prometheus scripts added
1 parent 6044c53 commit 286d257

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
kubectl apply -f ~/istio-0.4.0/install/kubernetes/addons/prometheus.yaml
4+
5+
POD_STATUS=""
6+
while [ "$POD_STATUS" != "Running" ]; do
7+
sleep 10
8+
POD_STATUS=$(kubectl get pods -l app=prometheus -n istio-system -o jsonpath='{.items[0].status.phase}')
9+
done
10+
11+
kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=prometheus -o jsonpath='{.items[0].metadata.name}') 9090:9090 &
12+
13+
echo "Prometheus running on: http://localhost:9090/"
14+
15+
### DELETE ###
16+
# lsof -c kubectl -ti:9090 -a | xargs kill
17+
# kubectl delete -f ~/istio-0.4.0/install/kubernetes/addons/prometheus.yaml

0 commit comments

Comments
 (0)