内容简介:本篇文章,所使用的任何镜像和yaml我都会发一个网盘链接,供大家下载学习!github:有任何问题可以直接联系我的Email:heyangev@cn.ibm.com
本篇文章,所使用的任何镜像和yaml我都会发一个网盘链接,供大家下载学习!
github: https://github.com/heyangguang
有任何问题可以直接联系我的Email:heyangev@cn.ibm.com
Heapster是一个收集者,将每个Node上的cAdvisor的数据进行汇总,然后导到第三方工具(如InfluxDB)。
Heapster介绍
架构图:
Heapster首先从K8S Master获取集群中所有Node的信息,然后通过这些Node上的kubelet获取有用数据,而kubelet本身的数据则是从cAdvisor得到。所有获取到的数据都被推到Heapster配置的后端存储中,并还支持数据的可视化。现在后端存储 + 可视化的方法,如InfluxDB + grafana。
部署实施:
下载heapster镜像,上传heapster.yaml、heapster-mod.yaml文件apply就可以了。
k8smaster: [root@k8smaster ~]# docker pull registry.cn-hangzhou.aliyuncs.com/google_containers/heapster-amd64:v1.5.4 Trying to pull repository registry.cn-hangzhou.aliyuncs.com/google_containers/heapster-amd64 ... v1.5.4: Pulling from registry.cn-hangzhou.aliyuncs.com/google_containers/heapster-amd64 91380601464e: Pull complete f351486260ed: Pull complete Digest: sha256:c4a8d9c0007abb73a1b9e4f9c8bfb044e475aae2b4e6276ab2f8b13959cf6949 Status: Downloaded newer image for registry.cn-hangzhou.aliyuncs.com/google_containers/heapster-amd64:v1.5.4 [root@k8smaster ~]# ls anaconda-ks.cfg heapster-mod.yaml heapster.yaml images.tar kube-flannel.yml [root@k8smaster ~]# kubectl apply -f heapster.yaml serviceaccount/heapster created clusterrolebinding.rbac.authorization.k8s.io/heapster created deployment.apps/heapster created service/heapster created [root@k8smaster ~]# kubectl apply -f heapster-mod.yaml Warning: kubectl apply should be used on resource created by either kubectl create --save-config or kubectl apply clusterrole.rbac.authorization.k8s.io/system:heapster configured 查看状态: [root@k8smaster ~]# kubectl get pods -n kube-system NAME READY STATUS RESTARTS AGE coredns-86c58d9df4-kmfct 1/1 Running 0 23m coredns-86c58d9df4-qn2k2 1/1 Running 0 23m etcd-k8smaster 1/1 Running 0 23m heapster-569b679494-rktzf 1/1 Running 0 18s kube-apiserver-k8smaster 1/1 Running 1 22m kube-controller-manager-k8smaster 1/1 Running 0 22m kube-flannel-ds-amd64-9rmfz 1/1 Running 0 19m kube-flannel-ds-amd64-vnwtf 1/1 Running 0 15m kube-flannel-ds-amd64-x7q4s 1/1 Running 0 15m kube-proxy-7zl9n 1/1 Running 0 22m kube-proxy-t2sx9 1/1 Running 0 23m kube-proxy-txsfr 1/1 Running 0 22m kube-scheduler-k8smaster 1/1 Running 0 23m 稍等一会,使用kubectl top node查看集群状态即可: [root@k8smaster ~]# kubectl top node NAME CPU(cores) CPU% MEMORY(bytes) MEMORY% k8smaster 122m 3% 2848Mi 8% k8snode-1 27m 0% 603Mi 1% k8snode-2 26m 0% 582Mi 1%
到这里heapster收集集群数据教程就完成了!
希望大家可以给我指出问题,我们一起前进!
谢谢大家!
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- CentOS7.5 Kubernetes V1.13(最新版)二进制部署集群
- 实战生产环境:kubeadmin安装1.13.3最新版k8s集群教程
- python模拟登陆知乎(最新版)
- 某开源博客系统最新版源码审计
- CocoaPods打包私有库实践 | 最新版
- 记录过某常见WAF最新版
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Learn Python 3 the Hard Way
Zed A. Shaw / Addison / 2017-7-7 / USD 30.74
You Will Learn Python 3! Zed Shaw has perfected the world’s best system for learning Python 3. Follow it and you will succeed—just like the millions of beginners Zed has taught to date! You bring t......一起来看看 《Learn Python 3 the Hard Way》 这本书的介绍吧!