Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 1.4 KB

File metadata and controls

50 lines (35 loc) · 1.4 KB

Kubernetes setup

This directory contains patch scripts to inject the Prometheus sidecar into existing Prometheus installations and to deploy a full example setup.

Required environment variables:

  • KUBE_NAMESPACE: namespace to run the script against
  • KUBE_CLUSTER: cluster name parameter for the sidecar
  • GCP_REGION: GCP region parameter for the sidecar
  • GCP_PROJECT: GCP project parameter for the sidecar
  • SIDECAR_IMAGE_TAG: Version parameter for the sidecar

Optional environment variables:

  • SIDECAR_IMAGE_NAME: Image name parameter for the sidecar (default: gcr.io/stackdriver-prometheus/stackdriver-prometheus-sidecar)

If your cluster is not the default context:

kubectl config use-context <kubernetes_context>

patch.sh

Inject sidecar into Deployments or StatefulSets:

./patch.sh <deployment|statefulset> <name>

Additional environment variables:

  • DATA_DIR: data directory for the sidecar
  • DATA_VOLUME: name of the volume that contains Prometheus's data

patch-operated.sh

Injects sidecar into Prometheus deployments controlled by the prometheus-operator:

./patch-operated.sh <prometheus_name>

full/deploy.sh

Deploys a basic Prometheus deployment to monitor Kubernetes components and custom services that are annotated with the well-known prometheus.io/* annotations.

./full/deploy.sh