Back to Charts

Cloudwatch exporter

stable/prometheus-cloudwatch-exporter/README.md

latest9.3 KB
Original Source

Cloudwatch exporter

DEPRECATED and moved to https://github.com/prometheus-community/helm-charts

TL;DR;

console
$ helm install stable/prometheus-cloudwatch-exporter

Introduction

This chart bootstraps a cloudwatch exporter deployment on a Kubernetes cluster using the Helm package manager.

Prerequisites

  • kube2iam installed to used the aws.role config option otherwise configure aws.aws_access_key_id and aws.aws_secret_access_key or aws.secret.name
  • Or an IAM Role for service account attached to a service account with an annotation. If you run the pod as nobody in securityContext.runAsUser then also set securityContext.fsGroup to the same value so it will be able to access to the mounted secret.

Installing the Chart

To install the chart with the release name my-release:

console
$ # pass AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY as values
$ helm install --name my-release stable/prometheus-cloudwatch-exporter --set aws.aws_access_key_id=$AWS_ACCESS_KEY_ID,aws.aws_secret_access_key=$AWS_SECRET_ACCESS_KEY

$ # or store them in a secret and pass its name as a value
$ kubectl create secret generic <SECRET_NAME> --from-literal=access_key=$AWS_ACCESS_KEY_ID --from-literal=secret_key=$AWS_SECRET_ACCESS_KEY
$ helm install --name my-release stable/prometheus-cloudwatch-exporter --set aws.secret.name=<SECRET_NAME>

$ # or add a role to aws with the [correct policy](https://github.com/prometheus/cloudwatch_exporter#credentials-and-permissions) to add to cloud watch and pass its name as a value
$ helm install --name my-release stable/prometheus-cloudwatch-exporter --set awsRole=<ROLL_NAME>

The command deploys Cloudwatch exporter on the Kubernetes cluster in the default configuration. The configuration section lists the parameters that can be configured during installation.

Uninstalling the Chart

To uninstall/delete the my-release deployment:

console
$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Configuration

The following table lists the configurable parameters of the Cloudwatch Exporter chart and their default values.

ParameterDescriptionDefault
image.repositoryImageprom/cloudwatch-exporter
image.tagImage tagcloudwatch_exporter-0.8.0
image.pullPolicyImage pull policyIfNotPresent
commandContainer entrypoint command[]
containerPortApplication listening port9106
service.typeService typeClusterIP
service.portThe service port80
service.portNameThe name of the service porthttp
service.annotationsCustom annotations for service{}
service.labelsAdditional custom labels for the service{}
resources{}
aws.roleAWS IAM Role To Use
aws.aws_access_key_idAWS access key id
aws.aws_secret_access_keyAWS secret access key
aws.secret.nameThe name of a pre-created secret in which AWS credentials are stored
aws.secret.includesSessionTokenWhether or not the pre-created secret contains an AWS STS session token
configCloudwatch exporter configurationexample configuration
rbac.createIf true, create & use RBAC resourcesfalse
serviceAccount.createSpecifies whether a service account should be created.true
serviceAccount.nameName of the service account.
serviceAccount.annotationsCustom annotations for service account.{}
tolerationsAdd tolerations[]
nodeSelectornode labels for pod assignment{}
affinitynode/pod affinities{}
livenessProbeLiveness probe settings
readinessProbeReadiness probe settings
serviceMonitor.enabledUse servicemonitor from prometheus operatorfalse
serviceMonitor.namespaceNamespace thes Servicemonitor is installed in
serviceMonitor.intervalHow frequently Prometheus should scrape
serviceMonitor.telemetryPathpath to cloudwatch-exporter telemtery-path
serviceMonitor.labelslabels for the ServiceMonitor passed to Prometheus Operator{}
serviceMonitor.timeoutTimeout after which the scrape is ended
serviceMonitor.relabelingsRelabelConfigs to apply to samples before scraping.
serviceMonitor.metricRelabelingsMetricRelabelConfigs to apply to samples before ingestion.
prometheusRule.enabledNamespace thes PrometheusRule is installed infalse
prometheusRule.namespaceUse PrometheusRule from prometheus operator
prometheusRule.labelslabels for the prometheusRule passed to Prometheus Operator
prometheusRule.rulesSpecify alerting rules in YAML format for PrometheusRule
ingress.enabledEnables Ingressfalse
ingress.annotationsIngress annotations{}
ingress.labelsCustom labels{}
ingress.hostsIngress accepted hostnames[]
ingress.tlsIngress TLS configuration[]
securityContextSecurity Context for the pod{}

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

console
$ helm install --name my-release \
    --set aws.role=my-aws-role \
    stable/prometheus-cloudwatch-exporter

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart. For example,

console
$ helm install --name my-release -f values.yaml stable/prometheus-cloudwatch-exporter