mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-30 15:22:07 +00:00
docs: fix markdown in how-to-monitor-k8s
Signed-off-by: Artem Navoiev <tenmozes@gmail.com>
This commit is contained in:
parent
0196902b2e
commit
f032f4347e
1 changed files with 14 additions and 0 deletions
|
@ -25,6 +25,7 @@ In this guide we will be using [victoria-metrics-k8s-stack](https://github.com/V
|
||||||
This chart will install `VMOperator`, `VMAgent`, `NodeExporter`, `kube-state-metrics`, `grafana` and some service scrape configurations to start monitoring kubernetes cluster components
|
This chart will install `VMOperator`, `VMAgent`, `NodeExporter`, `kube-state-metrics`, `grafana` and some service scrape configurations to start monitoring kubernetes cluster components
|
||||||
|
|
||||||
## Prerequisites
|
## Prerequisites
|
||||||
|
|
||||||
- Active Managed VictoriaMetrics instance. You can learn how to signup for Managed VictoriaMetrics [here](https://docs.victoriametrics.com/managed-victoriametrics/quickstart.html#how-to-register).
|
- Active Managed VictoriaMetrics instance. You can learn how to signup for Managed VictoriaMetrics [here](https://docs.victoriametrics.com/managed-victoriametrics/quickstart.html#how-to-register).
|
||||||
- Access to your kubernetes cluster
|
- Access to your kubernetes cluster
|
||||||
- Helm binary. You can find installation [here](https://helm.sh/docs/intro/install/)
|
- Helm binary. You can find installation [here](https://helm.sh/docs/intro/install/)
|
||||||
|
@ -34,27 +35,33 @@ Install the Helm chart in a custom namespace
|
||||||
|
|
||||||
1. Create a unique Kubernetes namespace, for example `monitoring`
|
1. Create a unique Kubernetes namespace, for example `monitoring`
|
||||||
<div class="with-copy" markdown="1">
|
<div class="with-copy" markdown="1">
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl create namespace monitoring
|
kubectl create namespace monitoring
|
||||||
```
|
```
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
1. Create kubernetes-secrets with token to access your dbaas deployment
|
1. Create kubernetes-secrets with token to access your dbaas deployment
|
||||||
<div class="with-copy" markdown="1">
|
<div class="with-copy" markdown="1">
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl --namespace monitoring create secret generic dbaas-write-access-token --from-literal=bearerToken=your-token
|
kubectl --namespace monitoring create secret generic dbaas-write-access-token --from-literal=bearerToken=your-token
|
||||||
kubectl --namespace monitoring create secret generic dbaas-read-access-token --from-literal=bearerToken=your-token
|
kubectl --namespace monitoring create secret generic dbaas-read-access-token --from-literal=bearerToken=your-token
|
||||||
```
|
```
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
You can find your access token on the "Access" tab of your deployment
|
You can find your access token on the "Access" tab of your deployment
|
||||||
<img src="kubernetes_monitoring.webp" width="800">
|
<img src="kubernetes_monitoring.webp" width="800">
|
||||||
1. Set up a Helm repository using the following commands:
|
1. Set up a Helm repository using the following commands:
|
||||||
<div class="with-copy" markdown="1">
|
<div class="with-copy" markdown="1">
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
helm repo add grafana https://grafana.github.io/helm-charts
|
helm repo add grafana https://grafana.github.io/helm-charts
|
||||||
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
|
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
|
||||||
helm repo add vm https://victoriametrics.github.io/helm-charts
|
helm repo add vm https://victoriametrics.github.io/helm-charts
|
||||||
helm repo update
|
helm repo update
|
||||||
```
|
```
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
1. Create a YAML file of Helm values called dbaas.yaml with following content
|
1. Create a YAML file of Helm values called dbaas.yaml with following content
|
||||||
<div class="with-copy" markdown="1">
|
<div class="with-copy" markdown="1">
|
||||||
|
@ -96,12 +103,15 @@ Install the Helm chart in a custom namespace
|
||||||
grafana:
|
grafana:
|
||||||
enabled: true
|
enabled: true
|
||||||
```
|
```
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
1. Install VictoriaMetrics-k8s-stack helm chart
|
1. Install VictoriaMetrics-k8s-stack helm chart
|
||||||
<div class="with-copy" markdown="1">
|
<div class="with-copy" markdown="1">
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
helm --namespace monitoring install vm vm/victoria-metrics-k8s-stack -f dbaas.yaml -n monitoring
|
helm --namespace monitoring install vm vm/victoria-metrics-k8s-stack -f dbaas.yaml -n monitoring
|
||||||
```
|
```
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## Connect grafana
|
## Connect grafana
|
||||||
|
@ -112,15 +122,19 @@ Connect to grafana and create your datasource
|
||||||
|
|
||||||
1. Get grafana password
|
1. Get grafana password
|
||||||
<div class="with-copy" markdown="1">
|
<div class="with-copy" markdown="1">
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl --namespace monitoring get secret vm-grafana -o jsonpath="{.data.admin-password}" | base64 -d
|
kubectl --namespace monitoring get secret vm-grafana -o jsonpath="{.data.admin-password}" | base64 -d
|
||||||
```
|
```
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
1. Connect to grafana
|
1. Connect to grafana
|
||||||
<div class="with-copy" markdown="1">
|
<div class="with-copy" markdown="1">
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
kubectl --namespace monitoring port-forward service/vm-grafana 3000:80
|
kubectl --namespace monitoring port-forward service/vm-grafana 3000:80
|
||||||
```
|
```
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
1. Open grafana in your browser [http://localhost:3000/datasources](http://localhost:3000/datasources)
|
1. Open grafana in your browser [http://localhost:3000/datasources](http://localhost:3000/datasources)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue