Created
March 31, 2019 21:14
-
-
Save dredfett/2e3d344597bf31e8dee3daa6cfd9a5c6 to your computer and use it in GitHub Desktop.
Setup CoreOS Kube-Prometheus
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Clone the git repo | |
#git clone git@github.com:coreos/prometheus-operator.git prometheus | |
# cd into prometheus/contrib/kube-prometheus | |
kubectl create -f manifests/ | |
until kubectl get customresourcedefinitions servicemonitors.monitoring.coreos.com ; do date; sleep 1; echo ""; done | |
until kubectl get servicemonitors --all-namespaces ; do date; sleep 1; echo ""; done | |
kubectl apply -f manifests/ # This command sometimes may need to be done twice (to workaround a race condition). | |
# Port forwards | |
#kubectl --namespace monitoring port-forward svc/prometheus-k8s 9090 | |
#kubectl --namespace monitoring port-forward svc/grafana 3000 | |
#kubectl --namespace monitoring port-forward svc/alertmanager-main 9093 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment