Type to search.

Prometheus requirements

ECK

Elastic Cloud on Kubernetes extends Kubernetes orchestration capabilities to allow you to deploy and manage components of the Elastic Stack.

Availability

  • Generally available

    This functionality is generally available and ready for production usage.

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

If you're using Prometheus, then you need to perform additional configuration to scrape the metrics endpoint using the configuration you set in Enabling the metrics endpoint and Securing the metrics endpoint.

Configure the RBAC settings for the Prometheus instance to access the metrics endpoint. These typically will be set automatically when using the Prometheus operator.

Your settings should look similar to the following:

YAML
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: prometheus
rules:
- nonResourceURLs:
  - /metrics
  verbs:
  - get

If you're using the Prometheus operator and your Prometheus instance is not in the same namespace as the ECK operator, then configure the Prometheus operator with the following Helm values. These values allow reading PodMonitor and ServiceMonitor across namespaces.

YAML
prometheus:
  prometheusSpec:
    podMonitorNamespaceSelector: {}
    podMonitorSelectorNilUsesHelmValues: false
    serviceMonitorNamespaceSelector: {}
    serviceMonitorSelectorNilUsesHelmValues: false

If you are using a custom TLS certificate and you need to set insecureSkipVerify to false, then you need to do the following:

  1. Create a Kubernetes secret within the Prometheus namespace that contains the Certificate Authority in PEM format.

    The easiest way to create the CA secret within the Prometheus namespace is to use the kubectl create secret generic command. For example:

    Shell
    kubectl create secret generic eck-metrics-tls-ca -n monitoring --from-file=ca.crt=/path/to/ca.pem
    
  2. Ensure that the CA secret is mounted within the Prometheus Pod.

    Steps will vary between Prometheus installations. If you're using the Prometheus operator, you can set the spec.secrets field of the Prometheus custom resource to the name of the previously created Kubernetes Secret. See the ECK Helm chart values file for more information.