伍佰目录 短网址
  当前位置:海洋目录网 » 站长资讯 » 站长资讯 » 文章详细 订阅RssFeed

K8S 部署 prometheus和granfana

来源:本站原创 浏览:112次 时间:2022-05-05
作者:李毓

现在的helm仓库如下

[root@adm-master prometheus]# helm repo listNAME        URL                                                   charts      https://kubernetes.oss-cn-hangzhou.aliyuncs.com/chartsstable      http://mirror.azure.cn/kubernetes/charts              aliyuncs    https://apphub.aliyuncs.com   

拉取peometheus 仓库

helm pull stable/prometheus

执行创建prometheus命令

[root@adm-master ~]# helm install  prometheus ./prometheusWARNING: This chart is deprecatedNAME: prometheusLAST DEPLOYED: Thu Mar 25 20:59:00 2021NAMESPACE: monitorSTATUS: deployedREVISION: 1TEST SUITE: NoneNOTES:DEPRECATED and moved to <https://github.com/prometheus-community/helm-charts>The Prometheus server can be accessed via port 80 on the following DNS name from within your cluster:prometheus-server.monitor.svc.cluster.localGet the Prometheus server URL by running these commands in the same shell:  export POD_NAME=$(kubectl get pods --namespace monitor -l "app=prometheus,component=server" -o jsonpath="{.items[0].metadata.name}")  kubectl --namespace monitor port-forward $POD_NAME 9090The Prometheus alertmanager can be accessed via port 80 on the following DNS name from within your cluster:prometheus-alertmanager.monitor.svc.cluster.localGet the Alertmanager URL by running these commands in the same shell:  export POD_NAME=$(kubectl get pods -l "app=prometheus,component=alertmanager" -o jsonpath="{.items[0].metadata.name}")  kubectl  port-forward $POD_NAME 9093#######################################################################################   WARNING: Pod Security Policy has been moved to a global property.  ###########            use .Values.podSecurityPolicy.enabled with pod-based      ###########            annotations                                               ###########            (e.g. .Values.nodeExporter.podSecurityPolicy.annotations) ######################################################################################The Prometheus PushGateway can be accessed via port 9091 on the following DNS name from within your cluster:prometheus-pushgateway.monitor.svc.cluster.localGet the PushGateway URL by running these commands in the same shell:  export POD_NAME=$(kubectl get pods --namespace monitor -l "app=prometheus,component=pushgateway" -o jsonpath="{.items[0].metadata.name}")  kubectl --namespace monitor port-forward $POD_NAME 9091For more information on running Prometheus, visit:https://prometheus.io/

拉取grafana

helm pull stable/grafana
[root@adm-master ~]# helm install grafana ./grafanaWARNING: This chart is deprecatedNAME: grafanaLAST DEPLOYED: Thu Mar 25 22:15:09 2021NAMESPACE: defaultSTATUS: deployedREVISION: 1NOTES:***********************DEPRECATED************************* The chart is deprecated. Future development has been moved to https://github.com/grafana/helm2-grafana1. Get your 'admin' user password by running:   kubectl get secret --namespace default grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo2. The Grafana server can be accessed via port 80 on the following DNS name from within your cluster:   grafana.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.kubernetes.io/name=grafana,app.kubernetes.io/instance=grafana" -o jsonpath="{.items[0].metadata.name}")     kubectl --namespace default port-forward $POD_NAME 30003. 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.                            ######################################################################################[root@adm-master ~]# kubectl get secret --namespace default grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echoG7ylRPHYL4aMGUxWv9YMPShZ6st9TCn1WLbmQlfi

还可以尝试导入模板

Dashboards–Manage–import

输入8919,点击load

  推荐站点

  • At-lib分类目录At-lib分类目录

    At-lib网站分类目录汇集全国所有高质量网站,是中国权威的中文网站分类目录,给站长提供免费网址目录提交收录和推荐最新最全的优秀网站大全是名站导航之家

    www.at-lib.cn
  • 中国链接目录中国链接目录

    中国链接目录简称链接目录,是收录优秀网站和淘宝网店的网站分类目录,为您提供优质的网址导航服务,也是网店进行收录推广,站长免费推广网站、加快百度收录、增加友情链接和网站外链的平台。

    www.cnlink.org
  • 35目录网35目录网

    35目录免费收录各类优秀网站,全力打造互动式网站目录,提供网站分类目录检索,关键字搜索功能。欢迎您向35目录推荐、提交优秀网站。

    www.35mulu.com
  • 就要爱网站目录就要爱网站目录

    就要爱网站目录,按主题和类别列出网站。所有提交的网站都经过人工审查,确保质量和无垃圾邮件的结果。

    www.912219.com
  • 伍佰目录伍佰目录

    伍佰网站目录免费收录各类优秀网站,全力打造互动式网站目录,提供网站分类目录检索,关键字搜索功能。欢迎您向伍佰目录推荐、提交优秀网站。

    www.wbwb.net