中文
注册

部署基于Prometheus的容器集群监测方案

  • 部署容器方案前请参见《Containerd 1.4 安装指南(CentOS 8.1&openEuler 20.03)》进行源码编译安装和K8s集群环境搭建,具体章节请参考4-源码编译安装5-搭建K8s集群环境
  • 本安装说明只是指导说明,具体部署方案需考虑实际业务场景。
  • 需要搭建K8s集群环境,至少存在一个子节点。
  1. 使用ConfigMaps管理应用配置。
    kubectl apply -f prometheus-config.yml

    请参考部署文件“prometheus-config.yml”

  2. 对Prometheus进行访问授权。
    kubectl apply -f prometheus-rbac-setup.yml

    请参考部署文件“prometheus-rbac-setup.yml”

  3. 使用Deployment部署Prometheus。
    kubectl apply -f prometheus-deployment.yml

    请参考部署文件“prometheus-deployment.yml”

  4. 使用NodeExporter监测集群资源使用情况。
    kubectl apply -f node-exporter-daemonset.yml

    请参考部署文件“node-exporter-daemonset.yml”

  5. 使用Blackbox Exporter对Ingress和Service进行探测。
    kubectl apply -f blackbox-exporter.yaml

    请参考部署文件“blackbox-exporter.yaml”

  6. 查看Pod状态。确保Pod状态都为Running。
    kubectl get pods
  7. 查看服务暴露端口。
    kubectl get svc

    如下图所示暴露端口为30900。

  8. 使用浏览器访问Prometheus UI界面。地址为节点IP地址:端口(图示为http://192.128.255.1:30900,本示例节点IP地址可以为集群内任何节点的内网IP地址)。

搜索结果
找到“0”个结果

当前产品无相关内容

未找到相关内容,请尝试其他搜索词