十六、kubernetes-部署性能监控平台

1. 概述

开源软件 cAdvisor(Container Advisor)用于监控所在节点的容器运行状态,当前已经 被默认集成到 kubelet 组件内,默认使用 tcp 4194 端口。在大规模容器集群,一般使用 prometheus+Granfana 平台实现集群性能数据的采集,存储与展示。

2. 监控平台搭建方案

prometheus+Granfana

prometheus:一套开源可以做到监控、报警、数据库以http协议周期性抓取被监控的组件的状态。不需要复杂的集成过程,使用http接口接入就可以了。

Grafana:开源的数据分析和可视化工具,支持多种数据源。

3. 搭建监控平台

准备文件
十六、kubernetes-部署性能监控平台_第1张图片

# prometheus
kubectl apply -f node-exporter.yaml
kubectl apply -f prometheus/rbac-setup.yaml
kubectl apply -f prometheus/configmap.yaml
kubectl apply -f prometheus/prometheus.deploy.yml
kubectl apply -f prometheus/prometheus.svc.yml


# Grafana
kubectl apply -f grafana/grafana-deploy.yaml
kubectl apply -f grafana/grafana-svc.yaml
kubectl apply -f grafana/grafana-ing.yaml

通过查看端口号访问

默认用户名和密码 admin/admin

配置数据源,使用prometheus 注意:url使用prometheus servicesIP
十六、kubernetes-部署性能监控平台_第2张图片
设置数据模板
十六、kubernetes-部署性能监控平台_第3张图片

你可能感兴趣的:(Kubernetes,kubernetes,docker)