Skip to content
Helm charts for Dgraph
Smarty Shell
Branch: master
Clone or download
Pull request Compare This branch is 8 commits ahead, 7 commits behind dgraph-io:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Dgraph Helm Chart

Installing the Chart

To add Helm repository locally:

$ helm repo add dgraph

To install the chart with the release name my-release:

$ helm install --name my-release dgraph

The above command will install the latest available dgraph docker image. In order to install the older versions:

$ helm install --name my-release dgraph --set image.tag=XXX

By default zero and alpha services are exposed only within the kubernetes cluster as kubernetes service type "ClusterIP". In order to expose the alpha service publicly you can use kubernetes service type "LoadBalancer":

$ helm install --name my-release dgraph --set alpha.service.type="LoadBalancer"

Deleting the Charts

Delete the Helm deployment as normal

$ helm delete my-release

Deletion of the StatefulSet doesn't cascade to deleting associated PVCs. To delete them:

$ kubectl delete pvc -l release=my-release,chart=dgraph


The following table lists the configurable parameters of the dgraph chart and their default values.

Parameter Description Default
image.registry Container registry name
image.repository Container image name dgraph/dgraph
image.tag Container image tag v1.0.13
image.pullPolicy Container pull policy Always Zero component name zero
zero.updateStrategy Strategy for upgrading zero nodes RollingUpdate
zero.monitor_label Monitor label for zero, used by prometheus. zero-dgraph-io
zero.rollingUpdatePartition Partition update strategy nil
zero.podManagementPolicy Pod management policy for zero nodes OrderedReady
zero.replicaCount Number of zero nodes 3
zero.shardReplicaCount Max number of replicas per data shard 5
zero.terminationGracePeriodSeconds Zero server pod termination grace period 60
zero.antiAffinity Zero anti-affinity policy soft
zero.podAntiAffinitytopologyKey Anti affinity topology key for zero nodes
zero.nodeAffinity Zero node affinity policy {}
zero.service.type Zero node service type ClusterIP
zero.securityContext.enabled Security context for zero nodes enabled false
zero.securityContext.fsGroup Group id of the zero container 1001
zero.securityContext.runAsUser User ID for the zero container 1001
zero.persistence.enabled Enable persistence for zero using PVC true
zero.persistence.storageClass PVC Storage Class for zero volume nil
zero.persistence.accessModes PVC Access Mode for zero volume ReadWriteOnce
zero.persistence.size PVC Storage Request for zero volume 8Gi
zero.nodeSelector Node labels for zero pod assignment {}
zero.tolerations Zero tolerations []
zero.resources Zero node resources requests & limits {}
zero.livenessProbe Zero liveness probes See values.yaml for defaults
zero.readinessProbe Zero readiness probes See values.yaml for defaults Alpha component name alpha
alpha.updateStrategy Strategy for upgrading alpha nodes RollingUpdate
alpha.monitor_label Monitor label for alpha, used by prometheus. alpha-dgraph-io
alpha.rollingUpdatePartition Partition update strategy nil
alpha.podManagementPolicy Pod management policy for alpha nodes OrderedReady
alpha.replicaCount Number of alpha nodes 3
alpha.terminationGracePeriodSeconds Alpha server pod termination grace period 60
alpha.antiAffinity Alpha anti-affinity policy soft
alpha.podAntiAffinitytopologyKey Anti affinity topology key for zero nodes
alpha.nodeAffinity Alpha node affinity policy {}
alpha.service.type Alpha node service type ClusterIP
alpha.securityContext.enabled Security context for alpha nodes enabled false
alpha.securityContext.fsGroup Group id of the alpha container 1001
alpha.securityContext.runAsUser User ID for the alpha container 1001
alpha.persistence.enabled Enable persistence for alpha using PVC true
alpha.persistence.storageClass PVC Storage Class for alpha volume nil
alpha.persistence.accessModes PVC Access Mode for alpha volume ReadWriteOnce
alpha.persistence.size PVC Storage Request for alpha volume 8Gi
alpha.nodeSelector Node labels for alpha pod assignment {}
alpha.tolerations Alpha tolerations []
alpha.resources Alpha node resources requests & limits {}
alpha.livenessProbe Alpha liveness probes See values.yaml for defaults
alpha.readinessProbe Alpha readiness probes See values.yaml for defaults Ratel component name ratel
ratel.replicaCount Number of ratel nodes 1
ratel.service.type Ratel service type ClusterIP
ratel.securityContext.enabled Security context for ratel nodes enabled false
ratel.securityContext.fsGroup Group id of the ratel container 1001
ratel.securityContext.runAsUser User ID for the ratel container 1001
ratel.livenessProbe Ratel liveness probes See values.yaml for defaults
ratel.readinessProbe Ratel readiness probes See values.yaml for defaults


Dgraph exposes prometheus metrics to monitor the state of various components involved in the cluster, this includes dgraph alpha and zero.

Follow the below mentioned steps to setup prometheus monitoring for your cluster:

  • Install Prometheus operator:
$ kubectl apply -f
  • Ensure that the instance of prometheus-operator has started before continuing.
$ kubectl get deployments prometheus-operator
prometheus-operator   1         1         1            1           3m
  • Apply prometheus manifest present here.
$ kubectl apply -f prometheus.yaml

serviceaccount/prometheus-dgraph-io created created created created created created

To view prometheus UI locally run:

$ kubectl port-forward prometheus-dgraph-io-0 9090:9090

The UI is accessible at port 9090. Open http://localhost:9090 in your browser to play around.

To register alerts from dgraph cluster with your prometheus deployment follow the steps below:

  • Create a kubernetes secret containing alertmanager configuration. Edit the configuration file present here with the required reciever configuration including the slack webhook credential and create the secret.

You can find more information about alertmanager configuration here.

$ kubectl create secret generic alertmanager-alertmanager-dgraph-io --from-file=alertmanager.yaml=alertmanager-config.yaml

$ kubectl get secrets
NAME                                            TYPE                 DATA   AGE
alertmanager-alertmanager-dgraph-io             Opaque               1      87m
  • Apply the alertmanager along with alert-rules manifest to use the default configured alert configuration. You can also add custom rules based on the metrics exposed by dgraph cluster similar to alert-rules manifest.
$ kubectl apply -f alertmanager.yaml created
service/alertmanager-dgraph-io created

$ kubectl apply -f alert-rules.yaml created
You can’t perform that action at this time.