【prometheus】kube-prometheus创建prometheus、grafana、alertmanager

kube-prometheus项目地址

https://github.com/coreos/kube-prometheus

安装

下载软件

git clone https://github.com/coreos/kube-prometheus.git

创建资源

cd kube-prometheus
kubectl apply -f setup
kubectl apply -f .

使用ingress映射prometheus各组件端口

cat <>prometheus-ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: prometheus-ingress
  namespace: monitoring
spec:
  rules:
  - host: prometheus.com
    http:
      paths:
      - path: /
        backend:
          serviceName: prometheus-k8s
          servicePort: 9090      
  - host: grafanaprometheus.com
    http:
      paths:
      - path: /
        backend:
          serviceName: grafana
          servicePort: 3000         
  - host: alert.com
    http:
      paths:
      - path: /
        backend:
          serviceName: alertmanager-main
          servicePort: 9093    
EOF

配置DNS映射,作者使用实验环境,所以在hosts做映射

192.168.145.11 prometheus.com
192.168.145.11 grafanaprometheus.com
192.168.145.11 alert.com

访问界面

prometheus

访问:prometheus.com
【prometheus】kube-prometheus创建prometheus、grafana、alertmanager_第1张图片

grafana

访问:grafanaprometheus.com
【prometheus】kube-prometheus创建prometheus、grafana、alertmanager_第2张图片

alertmanager

访问:alert.com
【prometheus】kube-prometheus创建prometheus、grafana、alertmanager_第3张图片
未完待续…

你可能感兴趣的:(prometheus)