Dev/DevOps

    Grafana와 EFS 연동

    목적 Helm으로 설치한 Grafana가 Storage를 안잡았더니, pod가 생성될때마다 Datasource와 Dashboard 설정을 해줘야했다. 이를 위해 PVC 설정을 하려고 한다. 방법 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 pvc 생성 및 확인 ..

    promethues 쿼리 몇 가지

    kubernetes에 prometheus & grafana로 구성하고, grafana 에서 사용한 prometheus 쿼리 몇가지 정리 합니다. 버전 Prometheus 2.26.0 Grafana 8.3.0 쿼리 Stat namespace 개수: count(kube_namespace_created) pvc 개수: count(kube_presistentvolumeclain_info) pod 개수: count(count by(pod)(container_spec_memory_reservation_limit_bytes{pod!=""})) container 개수: count(kube_pod_container_status_running{namespace!="/"}) Replica Rate: sum(kube_repl..