美文网首页Kubernetes
Kubernetes部署Prometheus

Kubernetes部署Prometheus

作者: 王勇1024 | 来源:发表于2019-10-03 18:11 被阅读0次

clone代码

在master可以进行安装部署
安装git,并下载相关yaml文件

git clone https://github.com/redhatxl/k8s-prometheus-grafana.git

拉取镜像

在node节点下载监控所需镜像

docker pull prom/node-exporter
docker pull prom/prometheus:v2.0.0
docker pull grafana/grafana:4.2.0

采用daemonset方式部署node-exporter组件

kubectl create -f  k8s-prometheus-grafana/node-exporter.yaml 

部署prometheus组件

kubectl create -f  k8s-prometheus-grafana/prometheus/rbac-setup.yaml
# 以configmap的形式管理prometheus组件的配置文件
kubectl create -f  k8s-prometheus-grafana/prometheus/configmap.yaml 
# Prometheus deployment 文件
kubectl create -f  k8s-prometheus-grafana/prometheus/prometheus.deploy.yml 
# Prometheus service文件
kubectl create -f  k8s-prometheus-grafana/prometheus/prometheus.svc.yml 

部署grafana组件

# grafana deployment配置文件
kubectl create -f   k8s-prometheus-grafana/grafana/grafana-deploy.yaml
# grafana service配置文件
kubectl create -f   k8s-prometheus-grafana/grafana/grafana-svc.yaml
# grafana ingress配置文件
kubectl create -f   k8s-prometheus-grafana/grafana/grafana-ing.yaml

相关文章

网友评论

    本文标题:Kubernetes部署Prometheus

    本文链接:https://www.haomeiwen.com/subject/lyecuctx.html