You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* updated generic docs with some requirements
added draft for metrics docs
updated readme
* more metrics docs
* finishing touches
* small touch to generic docs
* some more touches
* clarification when this function was added
* enriching the doc with usefull links
* last touch
Copy file name to clipboardExpand all lines: Documentation/generic.md
+7-3Lines changed: 7 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ All pod networking [CIDRs](https://en.wikipedia.org/wiki/Classless_Inter-Domain_
6
6
7
7
### Configuring the Kubelet
8
8
9
+
If you choose to run kube-router as daemonset, then both kube-apiserver and kubelet must be run with `--allow-privileged=true` option
10
+
9
11
Ensure each [Kubelet](https://kubernetes.io/docs/reference/generated/kubelet/) is configured with the following options:
10
12
11
13
--network-plugin=cni
@@ -19,11 +21,13 @@ _**Note: Switching CNI providers on a running cluster requires re-creating all p
19
21
20
22
### Configuring kube-controller-manager
21
23
22
-
The following options are mandatory for [kube-controller-manager](https://kubernetes.io/docs/reference/generated/kube-controller-manager/):
24
+
If you choose to use kube-router for pod-to-pod network connectivity then [kube-controller-manager](https://kubernetes.io/docs/reference/generated/kube-controller-manager/) need to be configured to allocate pod CIDRs by passing `--allocate-node-cidrs=true` flag and providing a `cluster-cidr` (i.e. by passing --cluster-cidr=10.32.0.0/12 for e.g.)
23
25
24
-
--cluster-cidr=${POD_NETWORK} # for example 10.32.0.0/12
25
-
--service-cluster-ip-range=${SERVICE_IP_RANGE} # for example 10.50.0.0/22
The scope of this document is to describe how to setup the [annotations](https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/) needed for [Prometheus](https://prometheus.io/) to use [Kubernetes SD](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#<kubernetes_sd_config>) to discover & scape kube-router [pods](https://kubernetes.io/docs/concepts/workloads/pods/pod/).
6
+
For help with installing Prometheus please see their [docs](https://prometheus.io/docs/introduction/overview/)
7
+
8
+
By default kube-router will export Prometheus metrics on port `8080` under the path `/metrics`.
9
+
If running kube-router as [daemonset](https://kubernetes.io/docs/concepts/workloads/controllers/daemonset/) this port might collide with other applications running on the host network and must be changed.
10
+
11
+
kube-router 0.1.0-rc2 and upwards supports the following runtime configuration for controlling where to expose the metrics.
12
+
If you are using a older version, metrics path & port is locked to `/metrics` & `8080`.
13
+
14
+
--metrics-port int Prometheus metrics port to use ( default 8080 )
15
+
--metrics-path string Path to serve Prometheus metrics on ( default /metrics )
16
+
17
+
By enabling [Kubernetes SD](https://prometheus.io/docs/prometheus/latest/configuration/configuration/#<kubernetes_sd_config>) in Prometheus configuration & adding required annotations it can automaticly discover & scrape kube-router metrics.
18
+
19
+
## Supported annotations
20
+
21
+
The following annotations can be set on pods/services to enable automatic SD & scraping
22
+
23
+
*`prometheus.io/scrape`: Only scrape services that have a value of `true`
24
+
*`prometheus.io/path`: If the metrics path is not `/metrics` override this.
25
+
*`prometheus.io/port`: If the metrics are exposed on a different port to the
0 commit comments