Connecting to Kubernetes master, updating heapster

12/12/2016

I would like to update Heapster configuration (add sink for influxdb). The problem is that, since we created cluster via Google Container Engine, heapster was created by default and have configuration file on kubernetes master. I can't connect to kubernetes master the same way i can connect to minion nodes (ssh). I would like to know if there is a way to update heapster pod configuration either directly via configuration file on k8s master or via kubernetes API

-- kotaldav
docker
google-kubernetes-engine
heapster
influxdb
kubernetes

1 Answer

12/19/2016

I have the same usecase, so I can share what I've found so far.

Heapster runs as cluster addon and it seems there's no way to add/delete/modify all of cluster addons on hosted Kubernetes in Google Container Engine (GKE). You can, however, control two of them: "HorizontalPodAutoscaling" and "HttpLoadBalancing" (source: https://cloud.google.com/container-engine/docs/clusters/operations#updating_a_container_cluster).

In Kubernetes 1.4 I was able to apply my custom Heapster Deployment (with influxdb sink) and it would effectively replace the built-in heapster addon. In Kubernetes 1.5.1 my changes are reverted and that makes sense, as there's probably a cluster addon manager which keeps all addons in sync (source: https://github.com/kubernetes/kubernetes/blob/master/cluster/addons/README.md.

What I've done in the end, is that I've created a separate Heapster deployment with influxdb sink (with a different name and pod labels). Pros: I have full control over it's configuration. Cons: two heapsters use more resources that one.

If you find a way to edit or disable the built-in heapster cluster addon, please share how to do it.

-- Jakub Gocławski
Source: StackOverflow