热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

kubernetes安装heapster、influxdb及grafana

下载yaml在这里下载deploykube-configinfluxdb修改yaml替换镜像gcr.iogoogle_containersheapster-grafana:v4.0

下载yaml

在这里下载deploy/kube-config/influxdb

修改yaml

  • 替换镜像

gcr.io/google_containers/heapster-grafana:v4.0.2
registry.cn-hangzhou.aliyuncs.com/kube_containers/heapster_grafanagcr.io/google_containers/heapster-influxdb:v1.1.1
registry.cn-hangzhou.aliyuncs.com/kube_containers/heapster_influxdbgcr.io/google_containers/heapster:v1.3.0-beta.0
registry.cn-hangzhou.aliyuncs.com/wayne/heapster:v1.1.0

  • 修改grafana-service.yaml
    添加external ip,同时把port由80改为3000。因为80的port跟heapster-service.yaml中的80的port冲突了。

apiVersion: v1
kind: Service
metadata:labels:# For use as a Cluster add-on (https://github.com/kubernetes/kubernetes/tree/master/cluster/addons)# If you are NOT using this as an addon, you should comment out this line.kubernetes.io/cluster-service: 'true'kubernetes.io/name: monitoring-grafananame: monitoring-grafananamespace: kube-system
spec:# In a production setup, we recommend accessing Grafana through an external Loadbalancer# or through a public IP.# type: LoadBalancer# You could also use NodePort to expose the service at a randomly-generated port# type: NodePortports:- port: 3000targetPort: 3000selector:k8s-app: grafanaexternalIPs: - 192.168.99.101

  • 修改influxdb-service.yaml
    新增8083的port暴露出来,同时添加external ip

apiVersion: v1
kind: Service
metadata:labels:task: monitoring# For use as a Cluster add-on (https://github.com/kubernetes/kubernetes/tree/master/cluster/addons)# If you are NOT using this as an addon, you should comment out this line.kubernetes.io/cluster-service: 'true'kubernetes.io/name: monitoring-influxdbname: monitoring-influxdbnamespace: kube-system
spec:ports:- name: httpport: 8083targetPort: 8083- name: apiport: 8086targetPort: 8086selector:k8s-app: influxdbexternalIPs: - 192.168.99.101

创建

kubectl create -f deploy/kube-config/influxdb/

配置grafana

http://192.168.99.101:3000/
修改下k8s数据源的url

clipboard.png

查看数据

clipboard.png

doc

  • Run Heapster in a Kubernetes cluster with an InfluxDB backend and a Grafana UI

  • <总结> 部署 Kubernetes&#43;Heapster&#43;InfluxDB&#43;Grafana 详解

  • Kubernetes监控——Heapster&#43;InfluxDB&#43;Grafana

  • heapster-yaml




推荐阅读
author-avatar
秦风2502869477
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有