1. 程式人生 > >kubernetes-dashboard新增heapster監控服務

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頁面