zoukankan      html  css  js  c++  java
  • 部署prometheus

    1.1、下载

    git clone -b release-0.7 --single-branch https://github.com/coreos/kube-prometheus.git
    

    1.2、安装operator

    [root@k8s-master01 ~]# cd /root/kube-prometheus/manifests/setup
    [root@k8s-master01 setup]# kubectl create -f .
    
    # 查看是否Running
    [root@k8s-master01 ~]# kubectl get pod -n monitoring
    NAME                                   READY   STATUS        RESTARTS   AGE
    prometheus-operator-848d669f6d-bz2tc   2/2     Running       0          4m16s
    

    1.3、安装Prometheus

    [root@k8s-master01 ~]# cd /root/kube-prometheus/manifests
    [root@k8s-master01 manifests]# kubectl create -f .
    

    1.4、创建ingress

    # 创建一下Ingress代理三个service
    # 创建一下Ingress代理三个service
    apiVersion: networking.k8s.io/v1beta1
    kind: Ingress
    metadata:
      generation: 1
      name: prom-ingresses
      namespace: monitoring
    spec:
      rules:
      - host: alert.test.com
        http:
          paths:
          - backend:
              serviceName: alertmanager-main
              servicePort: 9093
            path: /
      - host: grafana.test.com
        http:
          paths:
          - backend:
              serviceName: grafana
              servicePort: 3000
            path: /
      - host: prome.test.com
        http:
          paths:
          - backend:
              serviceName: prometheus-k8s
              servicePort: 9090
            path: /
    

    1.5、页面访问

    # 在你Windows的hosts文件添加主机映射,浏览器访问即可
    192.168.1.104 krm.test.com alert.test.com grafana.test.com prome.test.com
    
  • 相关阅读:
    第3章 Python的数据结构、函数和文件
    字符与编码
    第2章 IPython和Jupyter
    第1章 准备工作
    (转)详解Python的装饰器
    (转)Python中的split()函数
    5.5 用户定义的可调用类型
    2.6 序列的增量赋值
    Zookeeper简析
    Dubbo-服务引入源码分析
  • 原文地址:https://www.cnblogs.com/hsyw/p/14272514.html
Copyright © 2011-2022 走看看