Unable to get the cpu metrics while using metricbeats on kubernetes

You may need to edit the cluster role. See this Metricbeat apiserver metricset needs clusterrole when RBAC enabled in k8s 1.14