Skip to content

Customize configuration parameters for a NebulaGraph cluster

Meta, Storage, and Graph services in a Nebula Cluster have their configurations, which are defined as config in the YAML file of the CR instance (NebulaGraph cluster) you created. The settings in config are mapped and loaded into the ConfigMap of the corresponding service in Kubernetes.

Note

It is not available to customize configuration parameters for Nebula Clusters deployed with Helm.

The structure of config is as follows.

Config map[string]string `json:"config,omitempty"`

Prerequisites

You have created a NebulaGraph cluster. For how to create a cluster with Kubectl, see Create a cluster with Kubectl.

Steps

The following example uses a cluster named nebula to show how to set config for the Graph service in a NebulaGraph cluster.

  1. Run the following command to access the edit page of the nebula cluster.

    kubectl edit nebulaclusters.apps.nebula-graph.io nebula
    
  2. Add enable_authorize and auth_type under spec.graphd.config.

    apiVersion: apps.nebula-graph.io/v1alpha1
    kind: NebulaCluster
    metadata:
      name: nebula
      namespace: default
    spec:
      graphd:
        resources:
          requests:
            cpu: "500m"
            memory: "500Mi"
          limits:
            cpu: "1"
            memory: "1Gi"
        replicas: 1
        image: vesoft/nebula-graphd
        version: v2.6.2
        storageClaim:
          resources:
            requests:
              storage: 2Gi
          storageClassName: gp2
        config: // Custom configuration parameters for the Graph service in a cluster.
          "enable_authorize": "true"
          "auth_type": "password"
    ...
    

After customizing the parameters enable_authorize and auth_type, the configurations in the corresponding ConfigMap (nebula-graphd) of the Graph service will be overwritten.

Learn more

For more information on the configuration parameters of Meta, Storage, and Graph services, see Configurations.


Last update: March 13, 2023