Skip to content

Deploy Nebula Operator

You can deploy Nebula Operator with Helm.

Background

Nebula Operator automates the management of Nebula Graph clusters, and eliminates the need for you to install, scale, upgrade, and uninstall Nebula Graph clusters, which lightens the burden on managing different application versions.

Prerequisites

Install software

Before installing Nebula Operator, you need to install the following software and ensure the correct version of the software:

Software Requirement
Kubernetes >= 1.16
Helm >= 3.2.0
CoreDNS >= 1.6.0
CertManager >= 1.2.0
OpenKruise >= 0.8.0

If using a role-based access control policy, you need to enable RBAC (optional).

Description of software

Note

The following software used by Nebula Operator is from the third party. Nebula Operator is not responsible for any problems that may arise during the software installation.

  • CoreDNS

    CoreDNS is a flexible and scalable DNS server that is installed for Pods in Nebula Graph clusters.

    Components in a Nebula Graph cluster communicate with each other via DNS resolutions for domain names, like x.default.svc.cluster.local.

  • cert-manager

    Note

    If you have set the value of the Nebula Operator configuration item admissionWebhook.create to false, there is no need to install cert-manager. For details about Nebula Operator configuration items, see the Customize Helm charts section in Install Nebula Operator below.

    cert-manager is a tool that automates the management of certificates. It leverages extensions of the Kubernetes API and uses the Webhook server to provide dynamic access control to cert-manager resources. For more information about installation, see cert-manager installation documentation.

    cert-manager is used to validate the numeric value of replicas for each component in a Nebula Graph cluster. If you run it in a production environment and care about the high availability of Nebula Graph clusters, it is recommended to set the value of admissionWebhook.create to true before installing cert-manager.

  • OpenKruise

    OpenKruise is a full set of standard extensions for Kubernetes. It works well with original Kubernetes and provides more powerful and efficient features for managing Pods, sidecar containers, and even container images in clusters. OpenKruise is required to enable advanced features for StatefulSets when Nebula Operator starts. For information about installation, see openkruise installation documentation.

Steps

Install Nebula Operator

  1. Add the Nebula Operator chart repository to Helm.

    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
    

    For more information about helm repo, see Helm Repo.

  3. Install Nebula Operator.

    helm install nebula-operator nebula-operator/nebula-operator --namespace=<nebula-operator-system> --version=${chart_version}
    
    • <nebula-operator-system> is a user-created namespace name. If you have not created this namespace, run kubectl create namespace nebula-operator-system to create one. You can also use a different name.
    • ${chart_version} is the version of the Nebula Operator chart. It can be unspecified when there is only one chart version in the Nebula Operator chart repository. Run helm search repo -l nebula-operator to see chart versions.

    You can customize the configuration items of the Nebula Operator chart before running the installation command. For more information, see Customize Helm charts below.

Customize Helm charts

Run helm show values [CHART] [flags] to see configurable options.

For example:

[k8s@master ~]$ helm show values nebula-operator/nebula-operator
image:
  nebulaOperator:
    image: vesoft/nebula-operator:v0.8.0
    imagePullPolicy: IfNotPresent
  kubeRBACProxy:
    image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0
    imagePullPolicy: IfNotPresent
  kubeScheduler:
    image: k8s.gcr.io/kube-scheduler:v1.18.8
    imagePullPolicy: IfNotPresent

imagePullSecrets: []
kubernetesClusterDomain: ""

controllerManager:
  create: true
  replicas: 2
  env: []
  resources:
    limits:
      cpu: 100m
      memory: 30Mi
    requests:
      cpu: 100m
      memory: 20Mi

admissionWebhook:
  create: true

scheduler:
  create: true
  schedulerName: nebula-scheduler
  replicas: 2
  env: []
  resources:
    limits:
      cpu: 100m
      memory: 30Mi
    requests:
      cpu: 100m
      memory: 20Mi

The parameters in values.yaml are described as follows:

Parameter Default value Description
image.nebulaOperator.image vesoft/nebula-operator:v0.8.0 The image of Nebula Operator, version of which is v0.8.0.
image.nebulaOperator.imagePullPolicy IfNotPresent The image pull policy in Kubernetes.
imagePullSecrets - The image pull secret in Kubernetes.
kubernetesClusterDomain cluster.local The cluster domain.
controllerManager.create true Whether to enable the controller-manager component.
controllerManager.replicas 2 The numeric value of controller-manager replicas.
admissionWebhook.create true Whether to enable Admission Webhook.
shceduler.create true Whether to enable Scheduler.
shceduler.schedulerName nebula-scheduler The Scheduler name.
shceduler.replicas 2 The numeric value of nebula-scheduler replicas.

You can run helm install [NAME] [CHART] [flags] to specify chart configurations when installing a chart. For more information, see Customizing the Chart Before Installing.

The following example shows how to specify the Nebula Operator's AdmissionWebhook mechanism to be turned off when you install Nebula Operator (AdmissionWebhook is enabled by default):

helm install nebula-operator nebula-operator/nebula-operator --namespace=<nebula-operator-system> --set admissionWebhook.create=false

For more information about helm install, see Helm Install.

Upgrade Nebula Operator

After installing Nebula Operator, you can update it by modifying the parameter values in the ${HOME}/nebula-operator/charts/nebula-operator/values.yaml file.

  1. Clone the Nebula Operator repository to your local server.

    git clone https://github.com/vesoft-inc/nebula-operator.git
    
  2. Modify the parameter values in ${HOME}/nebula-operator/charts/nebula-operator/values.yaml.

  3. Run the following command to update Nebula Operator.

    helm upgrade nebula-operator nebula-operator/nebula-operator --namespace=<nebula-operator-system> -f ${HOME}/nebula-operator/charts/nebula-operator/values.yaml
    

    <nebula-operator-system> is a user-created namespace name. Pods related to the nebula-operator repository are in this namespace.

Uninstall Nebula Operator

  1. Uninstall the Nebula Operator chart.

    helm uninstall nebula-operator --namespace=<nebula-operator-system>
    
  2. Delete CRD.

    kubectl delete crd nebulaclusters.apps.nebula-graph.io
    

What's next

Automate the deployment of Nebula Graph clusters with Nebula Operator. For more information, see Deploy Nebula Graph Clusters with Kubectl or Deploy Nebula Graph Clusters with Helm.


Last update: September 30, 2021
Back to top