newtype
::: newtype의 지식창고 :::
newtype
전체 방문자
605,344
오늘
5
어제
7
  • 분류 전체보기 (390)
    • it (212)
      • c (43)
      • VB (5)
      • csharp (2)
      • java (2)
      • etc (32)
      • www (48)
      • emb (25)
      • win (4)
      • db (20)
      • sqlce (7)
      • devOps (8)
      • gmap (6)
      • python (2)
      • cygwin (2)
      • go (5)
      • ruby (1)
    • 명언 (10)
    • 모임 (18)
      • 붕주회 (3)
      • 신흥컴정 (14)
      • 웹20기 (1)
    • 사진 (8)
    • 불펌 (29)
    • 막글 (98)
    • 게임 (6)
    • 여행 (8)

블로그 메뉴

  • 홈
  • 태그
  • 방명록
  • 관리

공지사항

  • whoami
03-26 16:54
hELLO · Designed By 정상우.
newtype

::: newtype의 지식창고 :::

it/devOps

Grafana와 EFS 연동

2022. 8. 29. 17:44

목적

Helm으로 설치한 Grafana가 Storage를 안잡았더니, pod가 생성될때마다 Datasource와 Dashboard 설정을 해줘야했다. 이를 위해 PVC 설정을 하려고 한다.

방법

  1. grafana-pvc.yaml 생성
  • efs는 기존에 만들어진 efs-sc를 사용했다.
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: pvc-prom-grafana
  namespace: prometheus
  annotations:
    volume.beta.kubernetes.io/storage-class: efs-sc
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 10Gi
  1. pvc 생성 및 확인
$ kubectl apply -f grafana-pvc.yaml
$ kubectl get sc -n prometheus
NAME               STAUTS   VOLUME                                     CAPACITY     ACCESS MODES    STORAGECLASS   AGE
pvc-prom-grafana   Bound    pvc-a3294852-67db-4e03-9ca4-d816daf2bac0   10Gi         RWO             efs-sc         5m
  1. Helm chart의 initChownData 수정
  • initChownData를 찾아 enabled를 false로 수정한다. 이걸 해주지 않으면, Storage의 owner 변경을 실패해서 pod init에 실패한다.
initChownData:
  enabled: false
  1. Helm chart의 pvc 수정
  • enabled를 true로 바꾸고, existingClaim에 pvc 이름을 넣는다.
persistence:
  type: pvc
  enabled: true
  accessModes:
    - ReadWriteOnce
  size: 10Gi
  finalizers:
    - kubenetes.io/pvc-protection
  existingClaim: pvc-prom-grafana
  1. 수정된 Helm chart를 적용한다.
$ helm upgrade grafana --namespace prometheus .
반응형
저작자표시
    'it/devOps' 카테고리의 다른 글
    • Redis Cluster 구성
    • prompt에 kubenetes context 표시하기
    • nats - prometheus 연동
    • promethues 쿼리 몇 가지
    efs, grafana, helm, pvc
    newtype
    newtype
    지극히 개인적인 지식의 창고
    댓글쓰기
    다음 글
    nats - prometheus 연동
    이전 글
    promethues 쿼리 몇 가지

    티스토리툴바