k8s-1.28.2 部署prometheus

一、prometheus helm仓库

复制代码
## 网站地址
# https://artifacthub.io/


## prometheus 地址
# https://artifacthub.io/packages/helm/prometheus-community/prometheus

.

helm repo add prometheus-community https://prometheus-community.github.io/helm-charts

helm repo update

二、下载及解压

helm search repo prometheus-community

helm pull prometheus-community/kube-prometheus-stack

三、修改values.yaml文件

复制代码
# alertmanager: 修改

ingress:
    enabled: true
    ingressClassName: nginx
    annotations: {}
    labels: {}
    hosts:
      - alertmanager.kyc.com
    paths:
     - /
storage:
     volumeClaimTemplate:
       spec:
         storageClassName: nfs-logs
         accessModes: ["ReadWriteOnce"]
         resources:
           requests:
             storage: 50Gi

# grafana  修改
ingress:
    enabled: true
    ingressClassName: nginx
    annotations: {}
    labels: {}
    hosts:
      - grafana.kyc.com
    path: /


# prometheus: 修改
ingress:
    enabled: true
    ingressClassName: nginx
    annotations: {}
    labels: {}
    hosts:
      - prometheus.kys.com
    paths:
     - /
## Prometheus StorageSpec for persistent data
    ## ref: https://github.com/prometheus-operator/prometheus-operator/blob/main/Documentation/user-guides/storage.md
    ##
    storageSpec:
    ## Using PersistentVolumeClaim
    ##
      volumeClaimTemplate:
        spec:
          storageClassName: nfs-logs
          accessModes: ["ReadWriteOnce"]
          resources:
            requests:
              storage: 70Gi

helm upgrade --install prometheus ./ -f values.yaml -n prometheus

四、测试

grafana:

密码:

kubectl get secret -n prometheus prometheus-grafana -o jsonpath="{.data.admin-password}"|base64 --decode

五、添加数据源

有默认的,不用配置。

六、下载模板

下载模板:Grafana dashboards | Grafana Labs

七、导入dashboard

相关推荐
资源开发与学习2 天前
Kubernetes集群核心概念 Service
kubernetes
容器魔方2 天前
Bloomberg 正式加入 Karmada 用户组!
云原生·容器·云计算
muyun28002 天前
Docker 下部署 Elasticsearch 8 并集成 Kibana 和 IK 分词器
elasticsearch·docker·容器
爱敲代码的TOM2 天前
Prometheus+Grafana构建企业级监控方案
prometheus
Nazi63 天前
k8s的dashboard
云原生·容器·kubernetes
傻傻虎虎3 天前
【Docker】常用帮忙、镜像、容器、其他命令合集(2)
运维·docker·容器
是小崔啊3 天前
叩丁狼K8s - 概念篇
云原生·容器·kubernetes
summer_west_fish3 天前
2023年系统分析师上半年论文试题分析
kubernetes
LeeZhao@3 天前
【AI推理部署】Docker篇04—Docker自动构建镜像
人工智能·docker·容器
程思扬3 天前
利用JSONCrack与cpolar提升数据可视化及跨团队协作效率
网络·人工智能·经验分享·docker·信息可视化·容器·架构