怎么给minikube部署prometheus和grafana

1、方案选择

  • kube-prometheus,全家桶。
  • 分别安装prometheus和grafana
    我也不想选择第二种,但是我就一台普通的PC,安装kube-prometheus直接给我报错CPU不够用了,我~~

2、先尝试第一种,如果成功了就别瞎折腾了,心累~
先看下对应关系,最新的直接在github上看,旧的可能不好找。
在这里插入图片描述

git clone https://github.com/prometheus-operator/kube-prometheus.git
git checkout release-0.6 # 上面的兼容性说明
kubectl create -f manifests/setup
kubectl create -f manifests #完成安装
kubectl --namespace monitoring port-forward svc/prometheus-k8s 9090  ## Prometheus
kubectl --namespace monitoring port-forward svc/grafana 3000  ## Grafana
http://localhost:9090
http://localhost:3000

执行上面的命令,完成了就到这吧
3、安装prometheus

# 添加prometheus helm仓库
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
# 在monitoring下面安装prometheus
kubectl create ns monitoring
helm install prometheus prometheus-community/prometheus -n monitoring
# 暴露服务
kubectl expose service prometheus-server --type=NodePort --target-port=9090 --name=prometheus-server-np -n monitoring
# 访问服务
-> % minikube service prometheus-server-np -n monitoring

|</
  • 3
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值