Skip to content

Commit

Permalink
Introduce kubernetes package granularity (elastic#1018)
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrsMark committed Jun 28, 2021
1 parent 850a660 commit 3ebb0b7
Show file tree
Hide file tree
Showing 41 changed files with 8,096 additions and 4,084 deletions.
228 changes: 0 additions & 228 deletions packages/kubernetes/_dev/build/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,231 +82,3 @@ the masters won't be visible. In these cases it won't be possible to use `schedu

The Kubernetes package is tested with Kubernetes 1.13.x, 1.14.x, 1.15.x, 1.16.x, 1.17.x, and 1.18.x

## Metrics

### apiserver

This is the `apiserver` dataset of the Kubernetes package, in charge of retrieving metrics
from the Kubernetes API (available at `/metrics`).

This metricset needs access to the `apiserver` component of Kubernetes, accessible typically
by any POD via the `kubernetes.default` service or via environment
variables (`KUBERNETES_SERVICE_HOST` and `KUBERNETES_SERVICE_PORT`).

When the API uses https, the pod will need to authenticate using its default token and trust
the server using the appropiate CA file.

Configuration example using https and token based authentication:


In order to access the `/metrics` path of the API service, some Kubernetes environments might
require the following permission to be added to a ClusterRole.

```yaml
rules:
- nonResourceURLs:
- /metrics
verbs:
- get
```
{{event "apiserver"}}
{{fields "apiserver"}}
### container
This is the `container` dataset of the Kubernetes package. It collects container related metrics
from Kubelet's monitoring APIs.

{{event "container"}}

{{fields "container"}}

### controllermanager

This is the `controllermanager` dataset for the Kubernetes package. It collects from
Kubernetes controller component `metrics` endpoint.

{{event "controllermanager"}}

{{fields "controllermanager"}}

### event

This is the `event` dataset of the Kubernetes package. It collects Kubernetes events
related metrics.

{{event "event"}}

{{fields "event"}}

### node

This is the `node` dataset of the Kubernetes package. It collects Node related metrics
from Kubelet's monitoring APIs.

{{event "node"}}

{{fields "node"}}

### pod

This is the `pod` dataset of the Kubernetes package. It collects Pod related metrics
from Kubelet's monitoring APIs.

{{event "pod"}}

{{fields "pod"}}

### proxy

This is the `proxy` dataset of the Kubernetes package. It collects metrics
from Kubernetes Proxy component.

{{event "proxy"}}

{{fields "proxy"}}

### scheduler

This is the `scheduler` dataset of the Kubernetes package. It collects metrics
from Kubernetes Scheduler component.

{{event "scheduler"}}

{{fields "scheduler"}}

### state_container

This is the `state_container` dataset of the Kubernetes package. It collects container related
metrics from `kube_state_metrics`.

{{event "state_container"}}

{{fields "state_container"}}

### state_cronjob

This is the `state_cronjob` dataset of the Kubernetes package. It collects cronjob related
metrics from `kube_state_metrics`.

{{event "state_cronjob"}}

{{fields "state_cronjob"}}

### state_daemonset

This is the `state_daemonset` dataset of the Kubernetes package. It collects daemonset related
metrics from `kube_state_metrics`.

{{event "state_daemonset"}}

{{fields "state_daemonset"}}

### state_deployment

This is the `state_deployment` dataset of the Kubernetes package. It collects deployment related
metrics from `kube_state_metrics`.

{{event "state_deployment"}}

{{fields "state_deployment"}}

### state_node

This is the `state_node` dataset of the Kubernetes package. It collects node related
metrics from `kube_state_metrics`.

{{event "state_node"}}

{{fields "state_node"}}

### state_persistentvolume

This is the `state_persistentvolume` dataset of the Kubernetes package. It collects
PersistentVolume related metrics from `kube_state_metrics`.

{{event "state_persistentvolume"}}

{{fields "state_persistentvolume"}}

### state_persistentvolumeclaim

This is the `state_persistentvolumeclaim` dataset of the Kubernetes package. It collects
PersistentVolumeClaim related metrics from `kube_state_metrics`.

{{event "state_persistentvolumeclaim"}}

{{fields "state_persistentvolumeclaim"}}

### state_pod

This is the `state_pod` dataset of the Kubernetes package. It collects
Pod related metrics from `kube_state_metrics`.

{{event "state_pod"}}

{{fields "state_pod"}}

### state_replicaset

This is the `state_replicaset` dataset of the Kubernetes package. It collects
Replicaset related metrics from `kube_state_metrics`.

{{event "state_replicaset"}}

{{fields "state_replicaset"}}

### state_resourcequota

This is the `state_resourcequota` dataset of the Kubernetes package. It collects ResourceQuota related metrics
from `kube_state_metrics`.

{{event "state_resourcequota"}}

{{fields "state_resourcequota"}}

### state_service

This is the `state_service` dataset of the Kubernetes package. It collects
Service related metrics from `kube_state_metrics`.

{{event "state_service"}}

{{fields "state_service"}}

### state_statefulset

This is the `state_statefulset` dataset of the Kubernetes package.

{{event "state_statefulset"}}

{{fields "state_statefulset"}}

### state_storageclass

This is the `state_storageclass` dataset of the Kubernetes package. It collects
StorageClass related metrics from `kube_state_metrics`.

{{event "state_storageclass"}}

{{fields "state_storageclass"}}

### system

This is the `system` dataset of the Kubernetes package. It collects System related metrics
from Kubelet's monitoring APIs.

{{event "system"}}

{{fields "system"}}

### volume

This is the `volume` dataset of the Kubernetes package. It collects Volume related metrics
from Kubelet's monitoring APIs.

{{event "volume"}}

{{fields "volume"}}
12 changes: 12 additions & 0 deletions packages/kubernetes/_dev/build/docs/events.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# events

## Metrics

### event

This is the `event` dataset of the Kubernetes package. It collects Kubernetes events
related metrics.

{{event "event"}}

{{fields "event"}}
33 changes: 33 additions & 0 deletions packages/kubernetes/_dev/build/docs/kube-apiserver.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# kube-apiserver

## Metrics

### apiserver

This is the `apiserver` dataset of the Kubernetes package, in charge of retrieving metrics
from the Kubernetes API (available at `/metrics`).

This metricset needs access to the `apiserver` component of Kubernetes, accessible typically
by any POD via the `kubernetes.default` service or via environment
variables (`KUBERNETES_SERVICE_HOST` and `KUBERNETES_SERVICE_PORT`).

When the API uses https, the pod will need to authenticate using its default token and trust
the server using the appropiate CA file.

Configuration example using https and token based authentication:


In order to access the `/metrics` path of the API service, some Kubernetes environments might
require the following permission to be added to a ClusterRole.

```yaml
rules:
- nonResourceURLs:
- /metrics
verbs:
- get
```
{{event "apiserver"}}
{{fields "apiserver"}}
12 changes: 12 additions & 0 deletions packages/kubernetes/_dev/build/docs/kube-controller-manager.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# kube-controller-manager

## Metrics

### controllermanager

This is the `controllermanager` dataset for the Kubernetes package. It collects from
Kubernetes controller component `metrics` endpoint.

{{event "controllermanager"}}

{{fields "controllermanager"}}
12 changes: 12 additions & 0 deletions packages/kubernetes/_dev/build/docs/kube-proxy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# kube-proxy

## Metrics

### proxy

This is the `proxy` dataset of the Kubernetes package. It collects metrics
from Kubernetes Proxy component.

{{event "proxy"}}

{{fields "proxy"}}
12 changes: 12 additions & 0 deletions packages/kubernetes/_dev/build/docs/kube-scheduler.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# kube-scheduler

## Metrics

### scheduler

This is the `scheduler` dataset of the Kubernetes package. It collects metrics
from Kubernetes Scheduler component.

{{event "scheduler"}}

{{fields "scheduler"}}
Loading

0 comments on commit 3ebb0b7

Please sign in to comment.