Closed jchauncey closed 8 years ago
You can access the prometheus endpoint for the api server metrics by doing the following:
$ curl https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERIVCE_PORT/metrics --header "Authorization: Bearer $TOKEN" --insecure
Where $TOKEN
is the service account token located at /var/run/secrets/kubernetes.io/serviceaccount/token
https://github.com/kubernetes/kubernetes/blob/f91101e0926acf70864dc83de4a1c680b4bf26cb/pkg/metrics/api_server_metrics.go
We should collect the following metrics from the kube api server:
They use prometheus to expose this metrics so we should be able to use the telegraf prometheus client to poll that endpoint.