1、监控方案
cAdvisor+Heapster+InfluxDB+Grafana
cAdvisor/exporter+prometheus+Grafana
2、k8s监控指标及实现思路
服务发现:
https://prometheus.io/docs/prometheus/latest/configuration/configuration/#kubernetes_sd_config
3、在k8s中部暑prometheus
下载地址:
https://github.com/kubernetes/kubernetes/tree/master/cluster/addons/prometheus
yum install git -y
git clone https://github.com/kubernetes/kubernetes
cd /root/kubernetes/cluster/addons/
cp -rf prometheus/ /root/
cd /root/prometheus
kubectl apply -f prometheus-rbac.yaml
kubectl apply -f prometheus-configmap.yaml
# vi prometheus-statefulset.yaml
把storageClassName: standard改为storageClassName: managed-nfs-storage
kubectl apply -f prometheus-statefulset.yaml
# vi prometheus-service.yaml
type: NodePort 添加
kubectl apply -f prometheus-service.yaml
kubectl get pod,svc -n kube-system
觉得有用的朋友多帮忙点赞转发!后面更多运维技术分享内容,感兴趣的朋友可以关注一下@爱踢人生!!