Skip to content

Commit

Permalink
remove rbac not enabled doc
Browse files Browse the repository at this point in the history
  • Loading branch information
sanjid133 committed Aug 18, 2018
1 parent 9c4cda0 commit 77d0b3b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 61 deletions.
6 changes: 6 additions & 0 deletions docs/guides/etcd/initialization/using-snapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
30 changes: 5 additions & 25 deletions docs/guides/etcd/monitoring/using-builtin-prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
40 changes: 4 additions & 36 deletions docs/guides/etcd/monitoring/using-coreos-prometheus-operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 77d0b3b

Please sign in to comment.