kubernetes-dashboard添加heapster監控服務 原

前言:kubernetes組件正常啓動,kubernetes-dashboard頁面正常訪問

一、切換磁盤目錄創建heapster文件夾,mkdir keapster-用於存放配置的yaml文件

1、創建grafana.yaml文件touch grafana.yaml,編輯vim grafana.yaml,遠程訪問https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-config/influxdb/grafana.yaml ,將文件內容添加到grafana.yaml中,替換k8s.gcr.io鏡像地址爲registry.cn-hangzhou.aliyuncs.com/google_containers(從阿里雲鏡像倉庫下載)

2、分別創建heapster-rbac.yaml、heapster.yaml、influxdb.yaml文件,對應文件編輯內容爲https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-config/rbac/heapster-rbac.yaml,https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-config/influxdb/heapster.yaml,https://raw.githubusercontent.com/kubernetes/heapster/master/deploy/kube-config/influxdb/influxdb.yaml,替換文件中的鏡像地址同上

3、切換到heapster父級目錄下,執行kubectl apply -f heapster/、會看到創建了對應的幾個Pod

4、刷新kubernetes-dashboard頁面

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章