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

Create clusters

  1. Add the NebulaGraph Operator Helm repository.

    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=fast-disks             # The name of the StorageClass that has been created.
    
  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 \
        --set nameOverride=${NEBULA_CLUSTER_NAME} \
        --set nebula.storageClassName="${STORAGE_CLASS_NAME}" \
        # Specify the version of the NebulaGraph cluster. 
        --set nebula.version=v3.6.0 \  
        # Specify the version of the nebula-cluster chart. If not specified, the latest version of the chart is installed by default.  
        # Run 'helm search repo nebula-operator/nebula-cluster' to view the available versions of the chart.   
        --version=1.6.2 \
        --namespace="${NEBULA_CLUSTER_NAMESPACE}" \
    

    To view all configuration parameters of the NebulaGraph cluster, run the helm show values nebula-operator/nebula-cluster command or click nebula-cluster/values.yaml.

    Click Chart parameters to see descriptions and default values of the configurable cluster parameters.

    Use the --set argument to set configuration parameters for the cluster. For example, --set nebula.storaged.replicas=3 will set the number of replicas for the Storage service in the cluster to 3.

  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
    

Scaling clusters

  • The cluster scaling feature is for NebulaGraph Enterprise Edition only.

You can click on nebula-cluster/values.yaml to see more configurable parameters of the nebula-cluster chart. For more information about the descriptions of configurable parameters, see Configuration parameters of the nebula-cluster Helm chart below.

-->

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:

helm uninstall nebula --namespace=nebula

What's next

Connect to NebulaGraph Databases


Last update: September 20, 2023