grafana官網(wǎng)地址
專注于為中小企業(yè)提供做網(wǎng)站、網(wǎng)站建設(shè)服務(wù),電腦端+手機端+微信端的三站合一,更高效的管理,為中小企業(yè)四平免費做網(wǎng)站提供優(yōu)質(zhì)的服務(wù)。我們立足成都,凝聚了一批互聯(lián)網(wǎng)行業(yè)人才,有力地推動了超過千家企業(yè)的穩(wěn)健成長,幫助中小企業(yè)通過網(wǎng)站建設(shè)實現(xiàn)規(guī)模擴充和轉(zhuǎn)變。1.helm部署grafana
部署很簡單,見下
[root@k8s-node1 prometheus-grafana]# helm install stable/grafana --generate-name
NAME: grafana-1577432108
LAST DEPLOYED: Fri Dec 27 15:35:11 2019
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:
1. Get your 'admin' user password by running:
kubectl get secret --namespace default grafana-1577432108 -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
2. The Grafana server can be accessed via port 80 on the following DNS name from within your cluster:
grafana-1577432108.default.svc.cluster.local
Get the Grafana URL to visit by running these commands in the same shell:
export POD_NAME=$(kubectl get pods --namespace default -l "app=grafana,release=grafana-1577432108" -o jsonpath="{.items[0].metadata.name}")
kubectl --namespace default port-forward $POD_NAME 3000
3. Login with the password from step 1 and the username: admin
#################################################################################
###### WARNING: Persistence is disabled!!! You will lose your data when #####
###### the Grafana pod is terminated. #####
#################################################################################
注意這條:
1. Get your 'admin' user password by running:
kubectl get secret --namespace default grafana-1577432108 -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
服務(wù)起來了
[root@k8s-node1 ~]# kubectl get svc,pod |grep grafana
service/grafana-1577432108 ClusterIP 10.254.172.86 <none> 80/TCP 132m
pod/grafana-1577432108-65b987fdc6-dlhpb 1/1 Running 1 132m
2.配置web訪問
配置Ingress文件,讀取執(zhí)行,然后做host解析即可通過grafana-server訪問web.
[root@k8s-node1 prometheus-grafana]# cat grafana-server-ingress.yaml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: grafana-server
namespace: default
spec:
rules:
- host: grafana-server
http:
paths:
- path: /
backend:
serviceName: grafana-1577432108
servicePort: 80
3.登錄
看前面第1部的注意,登錄密碼通過那個提示來獲取.
[root@k8s-node1 prometheus-grafana]# kubectl get secret --namespace default grafana-1577432108 -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
sLJq2G4tBSiJcEHSobRoRiDRbCNXxT5qASQJkzF6
用戶名是:admin
密碼是:sLJq2G4tBSiJcEHSobRoRiDRbCNXxT5qASQJkzF6登錄成功,圖示見下:
4.添加數(shù)據(jù)源
添加prometheus源
http url是prometheus service的地址
[root@k8s-node1 prometheus-grafana]# kubectl get svc |grep server
prometheus-1577263826-server ClusterIP 10.254.132.104 <none> 80/TCP 47h
保存配置.再點擊dashboard.
再import,就可以看到圖形界面了
5.選一個自己喜歡的想用的個性參數(shù)更多的界面
去grafana網(wǎng)站下載模板json文件導(dǎo)入即可.
監(jiān)控節(jié)點模板
監(jiān)控pod容器模板1
網(wǎng)頁標題:k8s實踐18:helm部署安裝grafana配置測試-創(chuàng)新互聯(lián)
鏈接URL:http://aaarwkj.com/article0/dgoiio.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供品牌網(wǎng)站設(shè)計、響應(yīng)式網(wǎng)站、動態(tài)網(wǎng)站、云服務(wù)器、營銷型網(wǎng)站建設(shè)、外貿(mào)建站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)
猜你還喜歡下面的內(nèi)容