newtype
::: newtype의 지식창고 :::
newtype
전체 방문자
오늘
어제
  • 분류 전체보기 (392)
    • Dev (214)
      • C, C++ (43)
      • Go (5)
      • Web (49)
      • DBMS (21)
      • DevOps (8)
      • Java (2)
      • Windows, Win32 (4)
      • Visual Basic (5)
      • C# (2)
      • Mobile (25)
      • SQL CE (7)
      • Google Map (6)
      • Python (2)
      • cygwin (2)
      • 기타 (32)
      • Ruby (1)
    • 명언 (10)
    • 모임 (18)
      • 붕주회 (3)
      • 신흥컴정 (14)
      • 웹20기 (1)
    • 사진 (8)
    • 불펌 (29)
    • 막글 (98)
    • 게임 (6)
    • 여행 (8)

블로그 메뉴

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

공지사항

  • whoami
05-13 00:00
hELLO · Designed By 정상우.
newtype

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

Dev/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 .
반응형
저작자표시

'Dev > DevOps' 카테고리의 다른 글

Redis 성능 향상 방법  (0) 2022.10.13
Redis Cluster 구성  (0) 2022.10.12
prompt에 kubernetes context 표시하기  (0) 2022.09.16
nats - prometheus 연동  (0) 2022.09.05
promethues 쿼리 몇 가지  (0) 2022.08.22
    'Dev/DevOps' 카테고리의 다른 글
    • Redis Cluster 구성
    • prompt에 kubernetes context 표시하기
    • nats - prometheus 연동
    • promethues 쿼리 몇 가지
    newtype
    newtype
    지극히 개인적인 지식의 창고

    티스토리툴바