# 官方提供@yunTaoScripts 部署prometheus 🔥🔥

loading https://github.com/prometheus/prometheus

https://huangzhongde.cn/istio/Chapter3/Chapter3-5.html

wget https://github.com/prometheus-operator/kube-prometheus/archive/refs/tags/v0.10.0.tar.gz \
  -O kube-prometheus_v0.10.0.tar.gz
tar xf kube-prometheus_v0.10.0.tar.gz
cd kube-prometheus-0.10.0

cp manifests/grafana-service.yaml{,.ori}
sed -i '/spec:/a\  type: LoadBalancer' manifests/grafana-service.yaml

diff manifests/grafana-service.yaml.ori  manifests/grafana-service.yaml

cp manifests/prometheus-service.yaml{,.ori}

diff manifests/prometheus-service.yaml.ori manifests/prometheus-service.yaml


sed -i '/image:/s@k8s.gcr.io/kube-state-metrics@willdockerhub@' $(grep -l image: manifests/*.yaml)

kubectl create -f manifests/setup

kubectl apply -f manifests


kubectl get po -n monitoring