Skip to content

Commit a11e306

Browse files
committed
Write a proper Quick Start and improve Introduction
1 parent 283f50e commit a11e306

File tree

3 files changed

+81
-28
lines changed

3 files changed

+81
-28
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ theme:
1212

1313
.PHONY: public
1414
public:
15-
hugo
15+
hugo

content/docs/prologue/introduction.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,16 @@ The Prometheus operator includes, but is not limited to, the following features:
2424

2525
## Get started
2626

27-
There are two main ways to get started with Doks:
27+
<!-- There are two main ways to get started with Doks: -->
2828

2929
### Tutorial
3030

3131
{{< alert icon="👉" text="The Tutorial is intended for novice to intermediate users." >}}
3232

33-
Step-by-step instructions on how to start a new Doks project. [Tutorial →](https://getdoks.org/tutorial/introduction/)
33+
We still need to write you a proper tutorial...
34+
Feel free to [comment on the opened issue](https://github.com/prometheus-operator/website/issues/3) if you want to help!
35+
36+
<!-- Step-by-step instructions on how to start a new Doks project. [Tutorial →](https://getdoks.org/tutorial/introduction/) -->
3437

3538
### Quick Start
3639

@@ -46,6 +49,9 @@ Recipes, Reference Guides, Extensions, and Showcase.
4649

4750
Find out how to contribute to Doks. [Contributing →]({{< ref "contributing" >}})
4851

49-
## Help
52+
## Support
53+
54+
We have [GitHub Discussions](https://github.com/prometheus-operator/kube-prometheus/discussions) for kube-prometheus.
55+
We recommend asking questions there, as this is searchable compared to Slack.
5056

51-
Get help on Doks.
57+
We're happy to talk to you on the [Kubernetes Slack](http://slack.k8s.io/) in #prometheus-operator!
Lines changed: 70 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
22
title: "Quick Start"
3-
description: "One page summary of how to start a new Doks project."
4-
lead: "One page summary of how to start a new Doks project."
3+
description: "One page summary of how to start with the Prometheus Operator and kube-prometheus."
4+
lead: "One page summary of how to start with the Prometheus Operator and kube-prometheus."
55
date: 2020-11-16T13:59:39+01:00
6-
lastmod: 2020-11-16T13:59:39+01:00
76
draft: false
87
images: []
98
menu:
@@ -15,42 +14,90 @@ toc: true
1514

1615
## Requirements
1716

18-
Doks uses npm to install dependencies and run commands. Installing npm is pretty simple. Download and install [Node.js](https://nodejs.org/) (it includes npm) for your platform.
17+
The easiest way of starting with the Prometheus Operator is by deploying it as part of kube-prometheus.
18+
kube-prometheus deploys the Prometheus Operator and already schedules a Prometheus called `prometheus-k8s` with alerts and rules by default.
1919

20-
## Start a new Doks project
20+
All you need is access to a **Kubernetes cluster with kubectl!**
2121

22-
Create a new site, change directories, install dependencies, and start development server.
22+
<!-- TODO: Reference the deploy kube-prometheus to kind tutorial once available -->
2323

24-
### Create a new site
24+
> Note: For versions before Kubernetes v1.20.z refer to the [Kubernetes compatibility matrix](https://github.com/prometheus-operator/kube-prometheus#kubernetes-compatibility-matrix) in order to choose a compatible branch.
2525
26-
{{< btn-copy text="git clone https://github.com/h-enk/doks.git my-doks-site" >}}
26+
## Get the kube-prometheus project
2727

28-
```bash
29-
git clone https://github.com/h-enk/doks.git my-doks-site
28+
For a quick start we are going to deploy a cmopiled version of the Kubernetes [manifests](https://github.com/prometheus-operator/kube-prometheus/tree/main/manifests).
29+
30+
You can either clone the kube-prometheus from GitHub
31+
32+
```shell
33+
git clone https://github.com/prometheus-operator/kube-prometheus.git
3034
```
3135

32-
### Change directories
36+
or download the current main branch as zip file and extract its contents:
37+
38+
[github.com/prometheus-operator/kube-prometheus/archive/main.zip](https://github.com/prometheus-operator/kube-prometheus/archive/main.zip)
3339

34-
{{< btn-copy text="cd my-doks-site" >}}
40+
Once you have the files on your machine change into the project's root directory.
3541

36-
```bash
37-
cd my-doks-site
42+
## Deploy kube-prometheus
43+
44+
```shell
45+
# Create the namespace and CRDs, and then wait for them to be availble before creating the remaining resources
46+
kubectl create -f manifests/setup
47+
until kubectl get servicemonitors --all-namespaces ; do date; sleep 1; echo ""; done
48+
kubectl create -f manifests/
3849
```
3950

40-
### Install dependencies
51+
We create the namespace and CustomResourceDefinitions first to avoid race conditions when deploying the monitoring components.
52+
Alternatively, the resources in both folders can be applied with a single command `kubectl create -f manifests/setup -f manifests`,
53+
but it may be necessary to run the command multiple times for all components to be created successfullly.
54+
55+
## Access Prometheus
4156

42-
{{< btn-copy text="npm install" >}}
57+
Prometheus, Alertmanager, and Grafana dashboards can be accessed quickly using `kubectl port-forward` after running the quickstart via the commands below.
4358

44-
```bash
45-
npm install
59+
You can also learn how to [expose via an Ingress →]({{< ref "docs/exposing-prometheus-alertmanager-grafana-ingress" >}})
60+
61+
```shell
62+
kubectl --namespace monitoring port-forward svc/alertmanager-k8s 9090
4663
```
4764

48-
### Start development server
65+
Open Prometheus on [localhost:9090](http://localhost:9090) in your browser.
66+
67+
Check out the [alerts](http://localhost:9090/alerts) and [rules](http://localhost:9090/rules) pages with the pre-configured rules and alerts!
68+
This Prometheus is supposed to monitor your Kubernetes cluster and make sure to alert you if there's a problem with it.
69+
70+
For your own applications we recommend running one or more other instances.
71+
<!-- TODO: Write a tutorial/doc on self service aspcects of Prometheus Operator -->
4972

50-
{{< btn-copy text="npm run start" >}}
73+
## Access Alertmanager
5174

52-
```bash
53-
npm run start
75+
```shell
76+
kubectl --namespace monitoring port-forward svc/alertmanager-main 9093
5477
```
5578

56-
Doks will start the Hugo development webserver accessible by default at `http://localhost:1313`. Saved changes will live reload in the browser.
79+
Open Alertmanager on [localhost:9093](http://localhost:9093) in your browser.
80+
81+
<!-- TODO: Link to a document describing how to configure Alertmanager -->
82+
83+
## Access Grafana
84+
85+
```shell
86+
kubectl --namespace monitoring port-forward svc/grafana 3000
87+
```
88+
89+
Open Grafana on [localhost:3000](http://localhost:3000) in your browser.
90+
You can login with the username `admin` and password `admin`.
91+
92+
## Remove kube-prometheus
93+
94+
If you're down experimenting with kube-prometheus and the Prometheus Operator you can simply teardown the deployment by running:
95+
```shell
96+
kubectl delete --ignore-not-found=true -f manifests/ -f manifests/setup
97+
```
98+
99+
## Next Steps
100+
101+
kube-prometheus is developerd as a library.
102+
The idea is that you get a Kubernetes cluster monitoring stack and additionally you can add more Prometheus servers.
103+

0 commit comments

Comments
 (0)