From 77d0b3b88c54aed152b227436461f83462e7c34a Mon Sep 17 00:00:00 2001 From: sanjid133 Date: Sat, 18 Aug 2018 15:24:16 +0600 Subject: [PATCH] remove rbac not enabled doc --- .../etcd/initialization/using-snapshot.md | 6 +++ .../monitoring/using-builtin-prometheus.md | 30 +++----------- .../using-coreos-prometheus-operator.md | 40 ++----------------- 3 files changed, 15 insertions(+), 61 deletions(-) diff --git a/docs/guides/etcd/initialization/using-snapshot.md b/docs/guides/etcd/initialization/using-snapshot.md index ebdfa0329..85f8c5fff 100644 --- a/docs/guides/etcd/initialization/using-snapshot.md +++ b/docs/guides/etcd/initialization/using-snapshot.md @@ -100,6 +100,12 @@ Events: 3m 3m 1 Etcd operator Normal Initializing Initializing from Snapshot: "snapshot" ``` +To show existing data `kubectl exec` into a etcd pod and run following command: + +``` +ETCDCTL_API=3 etcdctl get "" --prefix=true +``` + ## Cleaning up To cleanup the Kubernetes resources created by this tutorial, run: diff --git a/docs/guides/etcd/monitoring/using-builtin-prometheus.md b/docs/guides/etcd/monitoring/using-builtin-prometheus.md index a92435102..30e6f27f8 100644 --- a/docs/guides/etcd/monitoring/using-builtin-prometheus.md +++ b/docs/guides/etcd/monitoring/using-builtin-prometheus.md @@ -286,12 +286,11 @@ spec: emptyDir: {} ``` -### In RBAC enabled cluster -If RBAC *is* enabled, Run the following command to deploy prometheus in kubernetes: +Run the following command to deploy prometheus in kubernetes: ```console -$ kubectl create -f https://raw.githubusercontent.com/kubedb/cli/0.8.0/docs/examples/monitoring/builtin-prometheus/rbac/demo-2.yaml +$ kubectl create -f https://raw.githubusercontent.com/kubedb/cli/0.8.0/docs/examples/monitoring/builtin-prometheus/demo-2.yaml clusterrole "prometheus-server" created serviceaccount "prometheus-server" created clusterrolebinding "prometheus-server" created @@ -314,24 +313,6 @@ default 1 48m prometheus-server 1 1m ``` -### In RBAC \*not\* enabled cluster - -If RBAC *is not* enabled, Run the following command to prepare your cluster for this tutorial: - -```console -$ kubectl create -f https://raw.githubusercontent.com/kubedb/cli/0.8.0/docs/examples/monitoring/builtin-prometheus/demo-2.yaml -deployment "prometheus-server" created -service "prometheus-service" created - - -$ $ kubectl get pods -n demo --watch - NAME READY STATUS RESTARTS AGE - etcd-mon-prometheus-7pvzjcd7dx 1/1 Running 0 20m - etcd-mon-prometheus-8slp4xxxl8 1/1 Running 0 20m - etcd-mon-prometheus-ld7n576tv5 1/1 Running 0 21m - prometheus-server-96cc4bfbc-dvw8p 1/1 Running 0 6m -``` - ### Prometheus Dashboard Now to open prometheus dashboard on Browser: @@ -366,10 +347,9 @@ $ kubectl delete etcd.kubedb.com/etcd-mon-prometheus -n demo $ kubectl delete dormantdatabase.kubedb.com/etcd-mon-prometheus -n demo -# In rbac enabled cluster, -# $ kubectl delete clusterrole prometheus-server -# $ kubectl delete clusterrolebindings prometheus-server -# $ kubectl delete serviceaccounts -n demo prometheus-server +$ kubectl delete clusterrole prometheus-server +$ kubectl delete clusterrolebindings prometheus-server +$ kubectl delete serviceaccounts -n demo prometheus-server $ kubectl delete ns demo namespace "demo" deleted diff --git a/docs/guides/etcd/monitoring/using-coreos-prometheus-operator.md b/docs/guides/etcd/monitoring/using-coreos-prometheus-operator.md index 517f24bac..18c33c153 100644 --- a/docs/guides/etcd/monitoring/using-coreos-prometheus-operator.md +++ b/docs/guides/etcd/monitoring/using-coreos-prometheus-operator.md @@ -28,12 +28,10 @@ Note that the yaml files that are used in this tutorial, stored in [docs/example ## Deploy CoreOS-Prometheus Operator -### In RBAC enabled cluster - -If RBAC *is* enabled, Run the following command to prepare your cluster for this tutorial: +Run the following command to prepare your cluster for this tutorial: ```console -$ kubectl create -f https://raw.githubusercontent.com/kubedb/cli/0.8.0/docs/examples/monitoring/coreos-operator/rbac/demo-0.yaml +$ kubectl create -f https://raw.githubusercontent.com/kubedb/cli/0.8.0/docs/examples/monitoring/coreos-operator/demo-0.yaml namespace "demo" created clusterrole "prometheus-operator" created serviceaccount "prometheus-operator" created @@ -80,35 +78,6 @@ prometheus 1 4m prometheus-operator 1 5m ``` -### In RBAC \*not\* enabled cluster - -If RBAC *is not* enabled, Run the following command to prepare your cluster for this tutorial: - -```console -$ kubectl create -f https://raw.githubusercontent.com/kubedb/cli/0.8.0/docs/examples/monitoring/coreos-operator/demo-0.yaml -namespace "demo" created -deployment "prometheus-operator" created - -$ kubectl get pods -n demo --watch -NAME READY STATUS RESTARTS AGE -prometheus-operator-5dcd844486-nprmk 0/1 ContainerCreating 0 27s -prometheus-operator-5dcd844486-nprmk 1/1 Running 0 46s - -$ kubectl get crd -NAME AGE -alertmanagers.monitoring.coreos.com 45s -prometheuses.monitoring.coreos.com 44s -servicemonitors.monitoring.coreos.com 44s -``` - -Once the Prometheus operator CRDs are registered, run the following command to create a Prometheus. - -```console -$ kubectl create -f https://raw.githubusercontent.com/kubedb/cli/0.8.0/docs/examples/monitoring/coreos-operator/demo-1.yaml -prometheus "prometheus" created -service "prometheus" created -``` - ### Prometheus Dashboard Now to open prometheus dashboard on Browser: @@ -301,9 +270,8 @@ $ kubectl delete -n demo etcd/etcd-mon-coreos $ kubectl patch -n demo drmn/etcd-mon-coreos -p '{"spec":{"wipeOut":true}}' --type="merge" $ kubectl delete -n demo drmn/etcd-mon-coreos -# In rbac enabled cluster, -# $ kubectl delete clusterrolebindings prometheus-operator prometheus -# $ kubectl delete clusterrole prometheus-operator prometheus +$ kubectl delete clusterrolebindings prometheus-operator prometheus +$ kubectl delete clusterrole prometheus-operator prometheus $ kubectl delete ns demo namespace "demo" deleted