Skip to content

Integration with cAdvisor #160

Closed
Closed
@monnand

Description

@monnand

cAdvisor right now already have some basic statistical information about containers running on the machine. We currently hold most recent stats in memory but we have a framework to dump stats into some backend storage. google/cadvisor#39 has a discussion about support influxdb and I think @erikh is working on that now.

I think the information collected by cAdvisor may be useful for kubernetes. I'm currently considering to add some code into kubelet so that kubelet could pull information from cAdvisor periodically.

Before getting started, I would like to discuss the approach we should take and other issues.

Currently, cAdvisor collects stats and stores them into memory. It will only remember recent stats and provide resource usage percentiles (currently, there are only CPU and memory). I think the resource usage percentiles would be useful for kubernetes master to do scheduling.

There are two possible ways to retrieve such information from cAdvisor:

Solution 1: kubelet pulls information from cAdvisor through REST API and expose another REST API for the master. The master will periodically check the containers' stats through kubelet's REST API. In this case, any information is sent through REST API. Currently, kubelet communicate with master through etcd only. So this approach will add one more communicate channel between kubelet and the master.

Solution 2: Since the percentiles information (e.g. what is the 90th percentile memory usage of a container) is not too big and may be small enough to fit into etcd. We could let cAdvisor update containers' information in etcd and let the master retrieve it whenever it wants to. Or, we could let kubelet pulls such information from cAdvisor and update the corresponding ectd key. In both cases, the communication is through etcd. The disadvantage of this approach is that the information that the master needs may increase to some big message not suitable to be put into etcd.

I would like to see other approaches or discussions of proposed ones.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions