- Kubernetes 1.19+
- Helm 3.2.0+
cat <<EOF > grafana-values.yaml
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
url: http://prometheus-server.telemetry.svc.cluster.local
basicAuth: false
basicAuthUser:
basicAuthPassword:
isDefault: true
editable: true
jsonData:
graphiteVersion: "1.1"
tlsAuth: false
tlsAuthWithCACert: false
dashboardProviders:
dashboardproviders.yaml:
apiVersion: 1
providers:
- name: 'default'
orgId: 1
folder: ''
type: file
disableDeletion: false
editable: true
options:
path: /var/lib/grafana/dashboards/default
dashboards:
default:
ceph-cluster:
gnetId: 2842
revision: 14
datasource: Prometheus
kubernetes-cluster:
gnetId: 7249
revision: 1
datasource: Prometheus
EOF
helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
helm install grafana grafana/grafana \
--create-namespace \
--namespace telemetry \
--set persistence.enabled=true \
--set adminUser=admin \
--set adminPassword=pgEGc9ZsCjYhczuI9rMGNpWscagmyKijxUgfHs0j \
--set service.type=NodePort \
--set service.nodePort=32071 \
-f grafana-values.yaml
아이디 : admin 비밀번호 :
kubectl get secret --namespace telemetry grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo