Customize configuration parameters for a NebulaGraph cluster¶
Meta, Storage, and Graph services in a NebulaGraph 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 NebulaGraph 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
and the cluster's configuration file named nebula_cluster.yaml
to show how to set config
for the Graph service in a NebulaGraph cluster.
-
Run the following command to access the edit page of the
nebula
cluster.kubectl edit nebulaclusters.apps.nebula-graph.io nebula
-
Add
enable_authorize
andauth_type
underspec.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: v3.3.0 storageClaim: resources: requests: storage: 2Gi storageClassName: fast-disks config: // Custom configuration parameters for the Graph service in a cluster. "enable_authorize": "true" "auth_type": "password" ...
-
Run
kubectl apply -f nebula_cluster.yaml
to push your configuration changes to the cluster.After customizing the parameters
enable_authorize
andauth_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.