K8s Monitoring with Prometheus + cAdvisor DaemonSet
View the Project on GitHub veerendra2/prometheus-k8s-monitoring
kubectl create -f https://raw.githubusercontent.com/veerendra2/prometheus-k8s-monitoring/master/cadvisor-daemonset.yml
kubectl create -f https://raw.githubusercontent.com/veerendra2/prometheus-k8s-monitoring/master/prometheus-configmap.yml
kubectl apply -f https://raw.githubusercontent.com/veerendra2/prometheus-k8s-monitoring/master/prometheus-rbac.yml
Deployment
which K8s creates Prometheus POD, Service with a NodePort 30900
kubectl create -f https://raw.githubusercontent.com/veerendra2/prometheus-k8s-monitoring/master/prometheus-deployment.yml
http://<NODE IP>:30900
__meta_kubernetes_pod_name
to container_label_io_kubernetes_pod_name
and __meta_kubernetes_namespace
to container_label_io_kubernetes_pod_namespace
which look like cAdvisor
’s metric tag. So carefull it will add exported_
for those two metrics like exported_container_label_io_kubernetes_pod_namespace
and exported_container_label_io_kubernetes_pod_name