Grafana Operations: Difference between revisions
Jump to navigation
Jump to search
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Internal= | =Internal= | ||
* [[Grafana#Subjects|Grafana]] | * [[Grafana#Subjects|Grafana]] | ||
=Overview= | |||
=Change Admin Password= | =Change Admin Password= | ||
Line 10: | Line 12: | ||
Apply: | Apply: | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
namespace=" | namespace="prom" | ||
cat <<EOF | kubectl -n ${namespace} apply -f - | cat <<EOF | kubectl -n ${namespace} apply -f - | ||
apiVersion: v1 | apiVersion: v1 | ||
Line 28: | Line 30: | ||
app.kubernetes.io/name: grafana | app.kubernetes.io/name: grafana | ||
EOF | EOF | ||
</syntaxhighlight> | |||
This will expose Grafana as: {{External|http://localhost:3000/}} | |||
=Set Light Theme= | |||
<syntaxhighlight lang='bash'> | |||
kubectl -n prom edit cm prometheus-grafana | |||
</syntaxhighlight> | |||
<syntaxhighlight lang='yaml'> | <syntaxhighlight lang='yaml'> | ||
data: | |||
grafana.ini: | | |||
... | |||
[users] | |||
default_theme = light | |||
</syntaxhighlight> | |||
<syntaxhighlight lang='bash'> | |||
kubectl -n prom scale deployment prometheus-grafana --replicas 0 | |||
kubectl -n prom scale deployment prometheus-grafana --replicas 1 | |||
</syntaxhighlight> |
Latest revision as of 05:33, 16 October 2020
Internal
Overview
Change Admin Password
The initial login credentials are admin/prom-operator. They are base64-encoded (and can be updated) in the prometheus-grafana secret.
Expose Grafana Locally
Apply:
namespace="prom"
cat <<EOF | kubectl -n ${namespace} apply -f -
apiVersion: v1
kind: Service
metadata:
name: prometheus-grafana-lb
namespace: ${namespace}
spec:
type: LoadBalancer
ports:
- name: service
port: 3000
protocol: TCP
targetPort: 3000
selector:
app.kubernetes.io/instance: prometheus
app.kubernetes.io/name: grafana
EOF
This will expose Grafana as:
Set Light Theme
kubectl -n prom edit cm prometheus-grafana
data:
grafana.ini: |
...
[users]
default_theme = light
kubectl -n prom scale deployment prometheus-grafana --replicas 0
kubectl -n prom scale deployment prometheus-grafana --replicas 1