<p>I'm using Kubernetes latest version (bare-metal on a multi-node cluster), and I can get cAdivsor metrics using Kubernetes metrics API. I can see cAdvisor provides <code>container_cpu_load_average_10s</code> metric which from its name, it is the aggregation of CPU loads in 10s.</p>

<p>Is there any way I can reduce this <code>aggregation/granularity</code> time to 1s? (having something like <code>container_cpu_load_average_1s</code>)</p>

<p>P.S: API Endpoint that I'm using is <code>https://&lt;my_k8s_ip&gt;:6443/api/v1/nodes/kubernetes3/proxy/metrics/cadvisor</code></p>

<p><strong>UPDATE:</strong> I just find out there is a <code>--housekeeping_interval</code> parameter but need to find out if it is the way to go, and if so then how can I change it in my current Kubernetes deployment. Any suggestion would be appreciated.</p>

Michel Gokan Khan
<p>Actually you don't need to update your deployment. <code>--housekeeping_interval</code> is parameter of <code>kubelet</code> . You need just add <code>--housekeeping_interval=1s</code> to startup script of <code>kubelet</code>. Config file for start <code>kubelet</code> is usually located in <code>/etc/systemd/system/kubelet.service.d/10-kubeadm.conf</code>.
Just update the string:</p>

<pre><code>ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_SYSTEM_PODS_ARGS $KUBELET_NETWORK_ARGS $KUBELET_DNS_ARGS $KUBELET_AUTHZ_ARGS $KUBELET_CADVISOR_ARGS $KUBELET_CERTIFICATE_ARGS $KUBELET_EXTRA_ARGS --housekeeping_interval=1s
</code></pre>

<p>Add the <code>--housekeeping_interval=1s</code> at the end, and restart kubelet. You need to do this on all nodes.</p>
