mkdir -p /opt/k8s/prometheus && cd /opt/k8s/prometheus
git clone https://github.com/prometheus-operator/kube-prometheus.git && cd kube-prometheus && git checkout v0.7.0
kubectl create -f manifests/setup
until kubectl get servicemonitors --all-namespaces ; do date; sleep 1; echo ""; done
kubectl create -f manifests/
kubectl patch svc -n monitoring grafana --type=json -p='[{"op": "add", "path": "/spec/ports/0/nodePort", "value":30002}, {"op": "replace", "path": "/spec/type", "value": "NodePort"}]'
kubectl patch svc -n monitoring prometheus-k8s --type=json -p='[{"op": "add", "path": "/spec/ports/0/nodePort", "value": 30003}, {"op": "replace", "path": "/spec/type", "value": "NodePort"}]'