美文网首页
使用helm安装prometheus监控kubernetes

使用helm安装prometheus监控kubernetes

作者: getsu | 来源:发表于2017-09-22 16:02 被阅读0次
    1. 提前创建pv和pvc(或者设置persistentVolume.enabled为false略过此步)
    apiVersion: v1
    kind: PersistentVolume
    metadata:
      name: pv001
    spec:
      capacity:
        storage: 2Gi
      accessModes:
        - ReadWriteOnce
      persistentVolumeReclaimPolicy: Retain
      storageClassName: small
      nfs:
        path: /app/data/alertprometheus/
        server: 172.25.16.168
    ---
    apiVersion: v1
    kind: PersistentVolume
    metadata:
      name: pv002
    spec:
      capacity:
        storage: 8Gi
      accessModes:
        - ReadWriteOnce
      persistentVolumeReclaimPolicy: Retain
      storageClassName: big
      nfs:
        path: /app/data/prometheus/
        server: 172.25.16.168
    
    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
      name: alert01
    spec:
      accessModes:
        - ReadWriteOnce
      storageClassName: small
      resources:
        requests:
          storage: 2Gi
    ---
    kind: PersistentVolumeClaim
    apiVersion: v1
    metadata:
      name: prometheus01
    spec:
      accessModes:
        - ReadWriteOnce
      storageClassName: big
      resources:
        requests:
          storage: 8Gi
    
    1. 安装prometheus
    • 提前修改values.yaml中的alertmanager.persistentVolume.existingClaimserver.persistentVolume.existingClaim为前步所创建的pvc名。
    • 修改values.yaml中的rbac.createtrue
    helm install --name prometheus stable/prometheus  -f prometheus/values.yaml 
    

    相关文章

      网友评论

          本文标题:使用helm安装prometheus监控kubernetes

          本文链接:https://www.haomeiwen.com/subject/tbyfextx.html