Skip to content

Deploy NebulaGraph clusters with Helm

Legacy version compatibility

The 1.x version NebulaGraph Operator is not compatible with NebulaGraph of version below v3.x.

Prerequisite

Install NebulaGraph Operator

Create clusters

  1. Add the NebulaGraph Operator chart repository to Helm (If you have already added the chart, skip the 1-2 steps and start from step 3).

    helm repo add nebula-operator https://vesoft-inc.github.io/nebula-operator/charts
    
  2. Update information of available charts locally from chart repositories.

    helm repo update
    
  3. Set environment variables to your desired values.

    export NEBULA_CLUSTER_NAME=nebula         # The desired NebulaGraph cluster name.
    export NEBULA_CLUSTER_NAMESPACE=nebula    # The desired namespace where your NebulaGraph cluster locates.
    export STORAGE_CLASS_NAME=gp2             # The desired StorageClass name in your NebulaGraph cluster.
    
  4. Create a namespace for your NebulaGraph cluster (If you have created one, skip this step).

    kubectl create namespace "${NEBULA_CLUSTER_NAMESPACE}"
    
  5. Apply the variables to the Helm chart to create a NebulaGraph cluster.

    helm install "${NEBULA_CLUSTER_NAME}" nebula-operator/nebula-cluster \
        --namespace="${NEBULA_CLUSTER_NAMESPACE}" \
        --set nameOverride=${NEBULA_CLUSTER_NAME} \
        --set nebula.storageClassName="${STORAGE_CLASS_NAME}"
    
  6. Check the status of the NebulaGraph cluster you created.

    kubectl -n "${NEBULA_CLUSTER_NAMESPACE}" get pod -l "app.kubernetes.io/cluster=${NEBULA_CLUSTER_NAME}"
    

    Output:

    NAME                READY   STATUS    RESTARTS   AGE
    nebula-graphd-0     1/1     Running   0          5m34s
    nebula-graphd-1     1/1     Running   0          5m34s
    nebula-metad-0      1/1     Running   0          5m34s
    nebula-metad-1      1/1     Running   0          5m34s
    nebula-metad-2      1/1     Running   0          5m34s
    nebula-storaged-0   1/1     Running   0          5m34s
    nebula-storaged-1   1/1     Running   0          5m34s
    nebula-storaged-2   1/1     Running   0          5m34s
    

Delete clusters

Run the following command to delete a NebulaGraph cluster with Helm:

helm uninstall "${NEBULA_CLUSTER_NAME}" --namespace="${NEBULA_CLUSTER_NAMESPACE}"

Or use variable values to delete a NebulaGraph cluster with Helm:

```bash helm uninstall nebula --namespace=nebula

What's next

Connect to NebulaGraph Databases

Configuration parameters of the nebula-cluster Helm chart

Parameter Default value Description
nameOverride nil Replaces the name of the chart in the Chart.yaml file.
nebula.version v3.2.1 The version of NebulaGraph.
nebula.imagePullPolicy IfNotPresent The NebulaGraph image pull policy. For details, see Image pull policy.
nebula.storageClassName nil The StorageClass name. StorageClass is the default persistent volume type.
nebula.schedulerName default-scheduler The scheduler name of a NebulaGraph cluster.
nebula.reference {"name": "statefulsets.apps", "version": "v1"} The workload referenced for a NebulaGraph cluster.
nebula.graphd.image vesoft/nebula-graphd The image name for a Graphd service. Uses the value of nebula.version as its version.
nebula.graphd.replicas 2 The number of the Graphd service.
nebula.graphd.env [] The environment variables for the Graphd service.
nebula.graphd.resources {"resources":{"requests":{"cpu":"500m","memory":"500Mi"},"limits":{"cpu":"1","memory":"1Gi"}}} The resource configurations for the Graphd service.
nebula.graphd.logStorage 500Mi The log disk storage capacity for the Graphd service.
nebula.graphd.podLabels {} Labels for the Graphd pod in a NebulaGraph cluster.
nebula.graphd.podAnnotations {} Pod annotations for the Graphd pod in a NebulaGraph cluster.
nebula.graphd.nodeSelector {} Labels for the Graphd pod to be scheduled to the specified node.
nebula.graphd.tolerations {} Tolerations for the Graphd pod.
nebula.graphd.affinity {} Affinity for the Graphd pod.
nebula.graphd.readinessProbe {} ReadinessProbe for the Graphd pod.
nebula.graphd.sidecarContainers {} Sidecar containers for the Graphd pod.
nebula.graphd.sidecarVolumes {} Sidecar volumes for the Graphd pod.
nebula.metad.image vesoft/nebula-metad The image name for a Metad service. Uses the value of nebula.version as its version.
nebula.metad.replicas 3 The number of the Metad service.
nebula.metad.env [] The environment variables for the Metad service.
nebula.metad.resources {"resources":{"requests":{"cpu":"500m","memory":"500Mi"},"limits":{"cpu":"1","memory":"1Gi"}}} The resource configurations for the Metad service.
nebula.metad.logStorage 500Mi The log disk capacity for the Metad service.
nebula.metad.dataStorage 1Gi The data disk capacity for the Metad service.
nebula.metad.podLabels {} Labels for the Metad pod in a NebulaGraph cluster.
nebula.metad.podAnnotations {} Pod annotations for the Metad pod in a NebulaGraph cluster.
nebula.metad.nodeSelector {} Labels for the Metad pod to be scheduled to the specified node.
nebula.metad.tolerations {} Tolerations for the Metad pod.
nebula.metad.affinity {} Affinity for the Metad pod.
nebula.metad.readinessProbe {} ReadinessProbe for the Metad pod.
nebula.metad.sidecarContainers {} Sidecar containers for the Metad pod.
nebula.metad.sidecarVolumes {} Sidecar volumes for the Metad pod.
nebula.storaged.image vesoft/nebula-storaged The image name for a Storaged service. Uses the value of nebula.version as its version.
nebula.storaged.replicas 3 The number of Storaged services.
nebula.storaged.env [] The environment variables for Storaged services.
nebula.storaged.resources {"resources":{"requests":{"cpu":"500m","memory":"500Mi"},"limits":{"cpu":"1","memory":"1Gi"}}} The resource configurations for Storagedss services.
nebula.storaged.logStorage 500Mi The log disk capacity for the Metad service.
nebula.storaged.dataStorage 1Gi The data disk capacity for the Metad service.
nebula.storaged.podLabels {} Labels for the Metad pod in a NebulaGraph cluster.
nebula.storaged.podAnnotations {} Pod annotations for the Metad pod in a NebulaGraph cluster.
nebula.storaged.nodeSelector {} Labels for the Metad pod to be scheduled to the specified node.
nebula.storaged.tolerations {} Tolerations for the Metad pod.
nebula.storaged.affinity {} Affinity for the Metad pod.
nebula.storaged.readinessProbe {} ReadinessProbe for the Metad pod.
nebula.storaged.sidecarContainers {} Sidecar containers for the Metad pod.
nebula.storaged.sidecarVolumes {} Sidecar volumes for the Metad pod.
imagePullSecrets [] The Secret to pull the NebulaGraph cluster image.

Last update: February 1, 2023