Tapani Moilanen 6a12f669f7 Use kubectl apply in custom service example deploy
https://github.com/kubernetes/kubernetes/issues/29542 has been fixed,
use apply instead of create to create third party resources in custom service
monitoring example.
2017-05-03 20:02:22 +03:00

16 lines
645 B
Bash
Executable File

#!/usr/bin/env bash
if [ -z "${KUBECONFIG}" ]; then
KUBECONFIG=~/.kube/config
fi
if [ -z "${NAMESPACE}" ]; then
NAMESPACE=default
fi
kubectl --namespace "$NAMESPACE" --kubeconfig="$KUBECONFIG" apply -f manifests/examples/example-app/prometheus-frontend-svc.yaml
kubectl --namespace "$NAMESPACE" --kubeconfig="$KUBECONFIG" apply -f manifests/examples/example-app/example-app.yaml
kubectl --namespace "$NAMESPACE" --kubeconfig="$KUBECONFIG" apply -f manifests/examples/example-app/prometheus-frontend.yaml
kubectl --namespace "$NAMESPACE" --kubeconfig="$KUBECONFIG" apply -f manifests/examples/example-app/servicemonitor-frontend.yaml