Files
kube-prometheus/hack/cluster-monitoring/teardown
Frederic Branczyk 9e319acaa9 hack/*: use kubectl apply where possible
There is an issue with kubectl apply and third party resources, so for
the time being we use create for TPRs, but apply for all manifests that
it can handle.
2017-01-03 13:22:40 +01:00

25 lines
491 B
Bash
Executable File

#!/usr/bin/env bash
if [ -z "${KUBECONFIG}" ]; then
export KUBECONFIG=~/.kube/config
fi
if [ -z "${NAMESPACE}" ]; then
NAMESPACE=monitoring
fi
kctl() {
kubectl --namespace "$NAMESPACE" "$@"
}
kctl delete -f manifests/exporters
kctl delete -f manifests/grafana
kctl delete -f manifests/prometheus
kctl delete -f manifests/alertmanager
# Hack: wait a bit to let the controller delete the deployed Prometheus server.
sleep 5
kctl delete -f manifests/prometheus-operator.yaml