dashboard最终效果

多了执行sh的窗口

heapster+influxdb+grafana搭建

整个架构是 dashboard去检测 hepster service服务, heapster通过cadvisor搜集到数据入库到influxdb. 而dashboard访问heapster的svc的8086端口获取数据绘图.

准备yaml

  1. https://github.com/kubernetes/heapster/blob/master/deploy/kube-config/influxdb
  2. [root@n1 influxdb]# tree .
  3. .
  4. ├── grafana.yaml
  5. ├── heapster.yaml
  6. └── influxdb.yaml

修改镜像并创建

  1. [root@n1 influxdb]# grep -r image: .
  2. ./influxdb.yaml: image: lanny/k8s.gcr.io_heapster-influxdb-amd64:v1.3.3
  3. ./grafana.yaml: image: lanny/k8s.gcr.io_heapster-grafana-amd64:v4.4.3
  4. ./heapster.yaml: image: lanny/gcr.io_google_containers_heapster-amd64:v1.5.0
  5. 注: 这里用v1.5.0heapster.看release用最新的,官方的yaml可能还是旧的

dashboard1.8.1

部署dashboard 1.8.1

https://github.com/kubernetes/dashboard/releases

dashboard.yaml

  1. apiVersion: extensions/v1beta1
  2. kind: Deployment
  3. metadata:
  4. labels:
  5. app: kubernetes-dashboard
  6. name: kubernetes-dashboard
  7. namespace: kube-system
  8. spec:
  9. replicas: 1
  10. selector:
  11. matchLabels:
  12. app: kubernetes-dashboard
  13. template:
  14. metadata:
  15. labels:
  16. app: kubernetes-dashboard
  17. # Comment the following annotation if Dashboard must not be deployed on master
  18. annotations:
  19. scheduler.alpha.kubernetes.io/tolerations: |
  20. [
  21. {
  22. "key": "dedicated",
  23. "operator": "Equal",
  24. "value": "master",
  25. "effect": "NoSchedule"
  26. }
  27. ]
  28. spec:
  29. containers:
  30. - name: kubernetes-dashboard
  31. image: lanny/gcr.io_google_containers_kubernetes-dashboard-amd64:v1.8.1
  32. imagePullPolicy: IfNotPresent
  33. ports:
  34. - containerPort: 9090
  35. protocol: TCP
  36. args:
  37. # Uncomment the following line to manually specify Kubernetes API server Host
  38. # If not specified, Dashboard will attempt to auto discover the API server and connect
  39. # to it. Uncomment only if the default does not work.
  40. # - --apiserver-host=http://my-address:port
  41. - --apiserver-host=http://192.168.x.x:8080
  42. - --heapster-host=http://heapster #要有这玩意,不然创建后可能heapster检查失败,导致ui不显示图形.
  43. livenessProbe:
  44. httpGet:
  45. path: /
  46. port: 9090
  47. initialDelaySeconds: 30
  48. timeoutSeconds: 30
  49. ---
  50. kind: Service
  51. apiVersion: v1
  52. metadata:
  53. labels:
  54. app: kubernetes-dashboard
  55. name: kubernetes-dashboard
  56. namespace: kube-system
  57. spec:
  58. type: NodePort
  59. ports:
  60. - port: 80
  61. targetPort: 9090
  62. selector:
  63. app: kubernetes-dashboard

出现的问题

ui图形不展示

dashboard的日志: dashboard会去连heapster的8082端口获取数据来展示图形. 这里看到heapster连不上,但是heapster的日志没问题

  1. 2018/01/02 04:14:29 Metric client health check failed: an error on the server ("Error: 'dial tcp 10.244.1.43:8082: getsockopt: connection refused'\nTrying to reach: 'http://10.244.1.43:8082/healthz'") has prevented the request from succeeding (get services heapster). Retrying in 30 seconds.
  2. 2018/01/02 04:15:20 Metric client health check failed: an error on the server ("Error: 'dial tcp 10.244.1.43:8082: getsockopt: connection refused'\nTrying to reach: 'http://10.244.1.43:8082/healthz'") has prevented the request from succeeding (get services heapster). Retrying in 30 seconds.
  3. 2018/01/02 04:16:11 Metric client health check failed: an error on the server ("Error: 'dial tcp 10.244.1.43:8082: getsockopt: connection refused'\nTrying to reach: 'http://10.244.1.43:8082/healthz'") has prevented the request from succeeding (get services heapster). Retrying in 30 seconds.

解决: dashboard的yaml加- --heapster-host=http://heapster 参数即可

参考: https://github.com/kubernetes/dashboard/issues/1602

创建dashboard后,访问不出现ui

我用参考官网的https://raw.githubusercontent.com/kubernetes/dashboard/v1.8.1/src/deploy/recommended/kubernetes-dashboard.yaml

发现这个毛病,所有用了1.7的yaml,暂时没去深究.

[k8s]dashboard1.8.1搭建( heapster1.5+influxdb+grafana)的更多相关文章

  1. Jmeter监控平台搭建:JMeter+InfluxDB+Grafana

    背景 平时一般用Jmeter的Gui模式,添加对应的插件,查看每秒线程数.TPS.响应时间等曲线,其实高并发是不建议这么看的. 解决方案 可以搭配InfluxDB+Grafana工具,使Jmeter异 ...

  2. Windows下本机简易监控系统搭建(Telegraf+Influxdb+Grafana)

    一.文件准备 1.1 文件名称 telegraf-1.2.1_windows_amd64.zip influxdb-1.2.2_windows_amd64.zip grafana-4.2.0.wind ...

  3. Windows下本机简易监控系统搭建(Telegraf+Influxdb+Grafana)--转

    原文地址:http://www.cnblogs.com/liugh/p/6683488.html 一.文件准备 1.1 文件名称 telegraf-1.2.1_windows_amd64.zip in ...

  4. 详解k8s原生的集群监控方案(Heapster+InfluxDB+Grafana) - kubernetes

    1.浅析监控方案 heapster是一个监控计算.存储.网络等集群资源的工具,以k8s内置的cAdvisor作为数据源收集集群信息,并汇总出有价值的性能数据(Metrics):cpu.内存.netwo ...

  5. Telegraf+InfluxDB+Grafana搭建服务器监控平台

    Telegraf+InfluxDB+Grafana搭建服务器监控平台 tags:网站 个人网站:https://wanghualong.cn/ 效果展示 本站服务器状态监控:https://statu ...

  6. collectd+influxDB+Grafana搭建性能监控平台

    网上查看了很多关于环境搭建的文章,都比较久远了很多安装包源都不可用了,今天收集了很多资料组合尝试使用新版本来搭建,故在此记录. 采集数据(collectd)-> 存储数据(influxdb) - ...

  7. Telegraf+InfluxDB+Grafana快速搭建实时监控系统 监控postgresql

    Telegraf+InfluxDB+Grafana快速搭建实时监控系统  监控postgresql

  8. .net core i上 K8S(一)集群搭建

    1.前言 以前搭建集群都是使用nginx反向代理,但现在我们有了更好的选择——K8S.我不打算一上来就讲K8S的知识点,因为知识点还是比较多,我打算先从搭建K8S集群讲起,我也是在搭建集群的过程中熟悉 ...

  9. ASP.NET Core on K8S学习初探(1)K8S单节点环境搭建

    当近期的一个App上线后,发现目前的docker实例(应用服务BFF+中台服务+工具服务)已经很多了,而我司目前没有专业的运维人员,发现运维的成本逐渐开始上来,所以容器编排也就需要提上议程.因此我决定 ...

随机推荐

  1. 【CSWS2014 Summer School】互联网广告中的匹配和排序算法-蒋龙(下)

    [CSWS2014 Summer School]互联网广告中的匹配和排序算法-蒋龙(上) Fig19,用到了矩阵,这个我没有听太明白,蒋博士也没有详细说明.不过可以明确的一点就是,我们常说的K-mea ...

  2. Adobe Dynamic Http Streaming的简单配置与实现 (FMS, HLS, HDS)

    http://blog.csdn.net/avsuper/article/details/7663879 Adobe的Http Dynamic Streaming是针对苹果的HLS方案提出基于HTTP ...

  3. Electron 调用系统工具记事本、计算器等

    const child = require('child_process').exec; child('notepad', function(err, data) {});//打开记事本 child( ...

  4. Js判断出生年月填写的 是否正确

    var r = /^(?:(?!0000)[0-9]{4}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-8])|(?:0[13-9]|1[0-2])-(?:29 ...

  5. vue inheritAttrs、$attrs和$listeners使用

    inheritAttrs.$attrs和$listeners使用场景: 组件传值,尤其是祖孙组件有跨度的传值. (1)inheritAttrs 属性说明:https://cn.vuejs.org/v2 ...

  6. SettingsMyEclipse

      迁移时间--2017年5月20日10:39:42 Author:Marydon-----------------------------------MyEclipse单独设置项---------- ...

  7. 读源码 | metisMenu侧边栏插件

    ————————————————————————————————————————————————————————— 使用方法 实现效果 引入文件 <link rel="styleshe ...

  8. DB2的认证和授权

    DB2 的安全性由两方面组成:认证和授权 1.认证 认证就是系统验证用户身份的过程.说的简单点,就是验证用户名和密码,因为DB2用户同时也是操作系统用户,所以,首先必须得到操作系统的认可.在默认情况下 ...

  9. WEB客户端和服务器

    # encoding=utf-8 #python 2.7.10 #xiaodeng #HTTP权威指南 #HTTP协议:超文本传输协议是在万维网上进行通信时所使用的协议方案. #WEB客户端和服务器: ...

  10. logging日志管理--将日志打印在屏幕上

    # -*- coding: cp936 -*- # test.py #http://blog.chinaunix.net/uid-27571599-id-3492860.html #logging日志 ...