linux-on-ibm-z/k8s-prometheus-adapter

Name: k8s-prometheus-adapter

Owner: LinuxONE and Linux on z Systems Open-source Team

Description: An implementation of the custom-metrics.metrics.k8s.io API using Prometheus

Created: 2018-05-14 13:28:41.0

Updated: 2018-05-14 13:28:43.0

Pushed: 2018-05-15 06:10:38.0

Homepage:

Size: 126

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Kubernetes Custom Metrics Adapter for Prometheus

Build Status

This repository contains an implementation of the Kubernetes custom metrics API (custom.metrics.k8s.io/v1beta1), suitable for use with the autoscaling/v2 Horizontal Pod Autoscaler in Kubernetes 1.6+.

Configuration

The adapter takes the standard Kubernetes generic API server arguments (including those for authentication and authorization). By default, it will attempt to using Kubernetes in-cluster config to connect to the cluster.

It takes the following addition arguments specific to configuring how the adapter talks to Prometheus and the main Kubernetes cluster:

Presentation

The adapter gathers the names of available metrics from Prometheus a regular interval (see Configuration above), and then only exposes metrics that follow specific forms.

In general:

Detailed information can be found under docs/format.md.

Example

A brief walkthrough exists in docs/walkthrough.md.

Additionally, @luxas has an excellent example deployment of Prometheus, this adapter, and a demo pod which serves a metric http_requests_total, which becomes the custom metrics API metric pods/http_requests. It also autoscales on that metric using the autoscaling/v2beta1 HorizontalPodAutoscaler.

It can be found at https://github.com/luxas/kubeadm-workshop. Pay special attention to:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.