searchusermenu
  • 发布文章
  • 消息中心
点赞
收藏
评论
分享
原创

如何使用helm部署Cortex监控

2023-05-29 01:32:37
37
0
  1. 添加helm仓库

    helm repo add cortex-helm https://cortexproject.github.io/cortex-helm-chart

  2. 下载helm包的values.yaml

    1. https://github.com/cortexproject/cortex-helm-chart/blob/10d7db4b9b1b8d19a854a95a16f27fdd917da415/values.yaml

    2. 修改values.yaml为cortex-values.yam

  3. 修改配置(必须改,不然会报错)

    在cortex-values.yaml修改存储配置,将你所用的对象存储的secretId和secretkey写入

4.创建secret和两个pv

secret用作访问对象存储

apiVersion: v1
kind: Secret
type: Opaque
metadata:
   name: oos-secret
   # Replaced by your secret namespace.
   namespace: kube-system
data:
   # Replaced by your temporary secret file content. You can generate a temporary secret key with these docs:
   # Note: The value must be encoded by base64.
   SecretId: 
   SecretKey: 

创建compactor所需的pv


apiVersion: v1
kind: PersistentVolume
metadata:
  name: storage-cortex-compactor-0
spec:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 10Gi
  csi:
    driver: <k8s-csi驱动>
    # Specify a unique volumeHandle like pv name or bucket name
    volumeHandle: storage-cortex-compactor-0
    volumeAttributes:
      # Replaced by the url of your region.
      url: <buctet-url>
      # Replaced by the bucket name you want to use.
      bucket: <buctetName>
      # cos bucket mount path
      path: "/"
      # cosfs log level, will use node syslog, support [dbg|info|warn|err|crit]
      dbglevel: "err"
      # You can specify any other options used by the cosfs command in here.
      additional_args: "-oensure_diskfree=20480"
    nodePublishSecretRef:
      # Replaced by the name and namespace of your secret.
      name: cos-secret
      namespace: kube-system

创建gateway所需的pv

apiVersion: v1
kind: PersistentVolume
metadata:
  name: storage-cortex-gateway-0
spec:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 10Gi
  csi:
    driver: <k8s-csi驱动>
    # Specify a unique volumeHandle like pv name or bucket name
    volumeHandle: storage-cortex-gateway-0
    volumeAttributes:
      # Replaced by the url of your region.
      url: <bucket-url>
      # Replaced by the bucket name you want to use.
      bucket: <bucketName>
      # cos bucket mount path
      path: "/"
      # cosfs log level, will use node syslog, support [dbg|info|warn|err|crit]
      dbglevel: "err"
      # You can specify any other options used by the cosfs command in here.
      additional_args: "-oensure_diskfree=20480"
    nodePublishSecretRef:
      # Replaced by the name and namespace of your secret.
      name: cos-secret
      namespace: kube-system

5.部署

helm install cortex -n cortex -f cortex-values.yaml cortex-helm/cortex

0条评论
0 / 1000
李****新
2文章数
0粉丝数
李****新
2 文章 | 0 粉丝
李****新
2文章数
0粉丝数
李****新
2 文章 | 0 粉丝
原创

如何使用helm部署Cortex监控

2023-05-29 01:32:37
37
0
  1. 添加helm仓库

    helm repo add cortex-helm https://cortexproject.github.io/cortex-helm-chart

  2. 下载helm包的values.yaml

    1. https://github.com/cortexproject/cortex-helm-chart/blob/10d7db4b9b1b8d19a854a95a16f27fdd917da415/values.yaml

    2. 修改values.yaml为cortex-values.yam

  3. 修改配置(必须改,不然会报错)

    在cortex-values.yaml修改存储配置,将你所用的对象存储的secretId和secretkey写入

4.创建secret和两个pv

secret用作访问对象存储

apiVersion: v1
kind: Secret
type: Opaque
metadata:
   name: oos-secret
   # Replaced by your secret namespace.
   namespace: kube-system
data:
   # Replaced by your temporary secret file content. You can generate a temporary secret key with these docs:
   # Note: The value must be encoded by base64.
   SecretId: 
   SecretKey: 

创建compactor所需的pv


apiVersion: v1
kind: PersistentVolume
metadata:
  name: storage-cortex-compactor-0
spec:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 10Gi
  csi:
    driver: <k8s-csi驱动>
    # Specify a unique volumeHandle like pv name or bucket name
    volumeHandle: storage-cortex-compactor-0
    volumeAttributes:
      # Replaced by the url of your region.
      url: <buctet-url>
      # Replaced by the bucket name you want to use.
      bucket: <buctetName>
      # cos bucket mount path
      path: "/"
      # cosfs log level, will use node syslog, support [dbg|info|warn|err|crit]
      dbglevel: "err"
      # You can specify any other options used by the cosfs command in here.
      additional_args: "-oensure_diskfree=20480"
    nodePublishSecretRef:
      # Replaced by the name and namespace of your secret.
      name: cos-secret
      namespace: kube-system

创建gateway所需的pv

apiVersion: v1
kind: PersistentVolume
metadata:
  name: storage-cortex-gateway-0
spec:
  accessModes:
  - ReadWriteOnce
  capacity:
    storage: 10Gi
  csi:
    driver: <k8s-csi驱动>
    # Specify a unique volumeHandle like pv name or bucket name
    volumeHandle: storage-cortex-gateway-0
    volumeAttributes:
      # Replaced by the url of your region.
      url: <bucket-url>
      # Replaced by the bucket name you want to use.
      bucket: <bucketName>
      # cos bucket mount path
      path: "/"
      # cosfs log level, will use node syslog, support [dbg|info|warn|err|crit]
      dbglevel: "err"
      # You can specify any other options used by the cosfs command in here.
      additional_args: "-oensure_diskfree=20480"
    nodePublishSecretRef:
      # Replaced by the name and namespace of your secret.
      name: cos-secret
      namespace: kube-system

5.部署

helm install cortex -n cortex -f cortex-values.yaml cortex-helm/cortex

文章来自个人专栏
文章 | 订阅
0条评论
0 / 1000
请输入你的评论
0
0