Kubebox relies on cAdvisor to retrieve the resource usage metrics.
Before version 0.8.0, Kubebox used to access the cAdvisor endpoints, that are embedded in the Kubelet. However, these endpoints are being deprecated, and will eventually be removed, as discussed in kubernetes#68522.
Starting version 0.8.0, Kubebox expects cAdvisor to be deployed as a DaemonSet.
This can be achieved with:
$ kubectl apply -f https://raw.githubusercontent.com/astefanutti/kubebox/master/cadvisor.yaml
It’s recommended to use the provided cadvisor.yaml file, that’s tested to work with Kubebox.
However, the DaemonSet example, from the cAdvisor project, should also work just fine.
Note that the cAdvisor containers must run with a privileged security context, so that they can access the container runtime on each node.
You can change the default --storage_duration and --housekeeping_interval options, added to the cAdvisor container arguments declared in the cadvisor.yaml file, to adjust the duration of the storage moving window (default to 5m0s), and the sampling period (default to 10s) respectively.
You may also have to provide the path of your cluster container runtime socket, in case it’s not following the usual convention.