YAML
file named dgraph-prometheus-operator.yaml
and edit the
values as appropriate for adding endpoints, adding alert rules, adjusting
alert manager configuration, adding Grafana dashboard, and others. For more
information see,
Dgraph Helm chart values.
YAML
file named secrets.yaml
that has the credentials for
Grafana.
prometheus-operator
Helm chart:
<MY-RELEASE-NAME>
in the namespace named monitoring
:
monitoring
namespace using
kubectl get svc -n monitoring
:
kubectl port-forward svc/dgraph-prometheus-release-prometheus -n monitoring 9090
to access Prometheus at localhost:9090
.
kubectl --namespace monitoring port-forward svc/grafana 3000:80
to
access Grafana at localhost:3000
.
secrets.yaml
file.
dgraph-kubernetes-grafana-dashboard.json
file in Import via panel JSON and click Load.
You can visualize all Dgraph Alpha and Zero Kubernetes Pods, using the
regular expression pattern "/dgraph-.*-[0-9]*$/
. You can change this in
the dashboard configuration and select the variable Pod. For example, if you
have multiple releases, and only want to visualize the current release named
my-release-3
, change the regular expression pattern to
"/my-release-3.*dgraph-.*-[0-9]*$/"
in the Pod variable of the dashboard
configuration. By default, the Prometheus that you installed is configured
as the Datasource
in Grafana.
storage-class: anything
). On the common cloud
environments like AWS, Google Cloud, and Azure, the default storage type are
slow disks like hard disks or low IOPS SSDs. We highly recommend using faster
disks for ideal performance when running Dgraph.
StorageClass
object to provision a specific type
of storage volume which you can then attach to your Dgraph Pods. You can set up
your cluster with local SSDs by using
Local Persistent Volumes.
This Kubernetes feature is in beta at the time of this writing (Kubernetes
v1.13.1). You can first set up an EC2 instance with locally attached storage.
Once it’s formatted and mounted properly, then you can create a StorageClass to
access it.:
iopsPerGB
parameter:
/removeNode
API
to remove the node from the cluster. With a Kubernetes StatefulSet, you’ll need
to remove the node in this order:
/removeNode
to remove the Dgraph instance from the
cluster (see More about Dgraph Zero). The
removed instance will immediately stop running. Any further attempts to join
the cluster fails for that instance since it has been removed.--raft
superflag’s idx
option. This might
require you to update the StatefulSet configuration.
initContainers
configuration in
dgraph-ha.yaml
to learn more.