Nebula Operator manages NebulaGraph clusters on Kubernetes and automates tasks related to operating a NebulaGraph cluster

Related tags

nebula-operator
Overview

Nebula Operator

Nebula Operator manages NebulaGraph clusters on Kubernetes and automates tasks related to operating a NebulaGraph cluster. It evolved from NebulaGraph Cloud Service, makes NebulaGraph a truly cloud-native database.

Quick Start

install nebula operator

See install/uninstall nebula operator .

Create and destroy a nebula cluster

$ kubectl create -f config/samples/apps_v1alpha1_nebulacluster.yaml

A none ha-mode nebula cluster will be created.

$ kubectl get pods -l app.kubernetes.io/instance=nebula
NAME                READY   STATUS    RESTARTS   AGE
nebula-graphd-0     1/1     Running   0          1m
nebula-metad-0      1/1     Running   0          1m
nebula-storaged-0   1/1     Running   0          1m
nebula-storaged-1   1/1     Running   0          1m
nebula-storaged-2   1/1     Running   0          1m

See client service for how to access nebula clusters created by the operator.
If you are working with kubeadm locally, create a nodePort service and test that nebula is responding:

$ kubectl create -f config/samples/graphd-nodeport-service.yaml

/ # nebula-console -u user -p password --address=192.168.8.26 --port=32236
2021/04/15 16:50:23 [INFO] connection pool is initialized successfully

Welcome to Nebula Graph!
([email protected]) [(none)]> 

Destroy the nebula cluster:

$ kubectl delete -f config/samples/apps_v1alpha1_nebulacluster.yaml

Resize a nebula cluster

Create a nebula cluster:

$ kubectl create -f config/samples/apps_v1alpha1_nebulacluster.yaml

In config/samples/apps_v1alpha1_nebulacluster.yaml the initial storaged replicas is 3.
Modify the file and change replicas from 3 to 5.

  storaged:
    resources:
      requests:
        cpu: "1"
        memory: "1Gi"
      limits:
        cpu: "1"
        memory: "1Gi"
    replicas: 5
    image: vesoft/nebula-storaged
    version: v2.0.0
    storageClaim:
      resources:
        requests:
          storage: 2Gi
      storageClassName: fast-disks

Apply the replicas change to the cluster CR:

$ kubectl apply -f config/samples/apps_v1alpha1_nebulacluster.yaml

The storaged cluster will scale to 5 members (5 pods):

$ kubectl get pods -l app.kubernetes.io/instance=nebula
NAME                READY   STATUS    RESTARTS   AGE
nebula-graphd-0     1/1     Running   0          2m
nebula-metad-0      1/1     Running   0          2m
nebula-storaged-0   1/1     Running   0          2m
nebula-storaged-1   1/1     Running   0          2m
nebula-storaged-2   1/1     Running   0          2m
nebula-storaged-3   1/1     Running   0          5m
nebula-storaged-4   1/1     Running   0          5m

Similarly we can decrease the size of the cluster from 5 back to 3 by changing the replicas field again and reapplying the change.

  storaged:
    resources:
      requests:
        cpu: "1"
        memory: "1Gi"
      limits:
        cpu: "1"
        memory: "1Gi"
    replicas: 3
    image: vesoft/nebula-storaged
    version: v2.0.0
    storageClaim:
      resources:
        requests:
          storage: 2Gi
      storageClassName: fast-disks

We should see that storaged cluster will eventually reduce to 3 pods:

$ kubectl get pods -l app.kubernetes.io/instance=nebula
NAME                READY   STATUS    RESTARTS   AGE
nebula-graphd-0     1/1     Running   0          10m
nebula-metad-0      1/1     Running   0          10m
nebula-storaged-0   1/1     Running   0          10m
nebula-storaged-1   1/1     Running   0          10m
nebula-storaged-2   1/1     Running   0          10m

Failover

If the minority of nebula components crash, the nebula operator will automatically recover the failure. Let's walk through this in the following steps.

Create a nebula cluster:

$ kubectl create -f config/samples/apps_v1alpha1_nebulacluster.yaml

Wait until pods are up. Simulate a member failure by deleting a storaged pod:

$ kubectl delete pod nebula-storaged-2 --now

The nebula operator will recover the failure by creating a new pod nebula-storaged-2:

$ kubectl get pods -l app.kubernetes.io/instance=nebula
NAME                READY   STATUS    RESTARTS   AGE
nebula-graphd-0     1/1     Running   0          15m
nebula-metad-0      1/1     Running   0          15m
nebula-storaged-0   1/1     Running   0          15m
nebula-storaged-1   1/1     Running   0          15m
nebula-storaged-2   1/1     Running   0          19s

FAQ

Please refer to FAQ.md

Community

Feel free to reach out if you have any questions. The maintainers of this project are reachable via:

Activity

Contributing

Contributions are welcome and greatly appreciated.

  • Start by some issues
  • Submit Pull Requests to us. Please refer to how-to-contribute.

Acknowledgements

nebula-operator refers to tidb-operator. They have made a very good product. We have a similar architecture, although the product pattern is different from the application scenario, we would like to express our gratitude here.

License

NebulaGraph is under the Apache 2.0 license. See the LICENSE file for details.

Issues
  • how to set storage class for aliyun, and hope to support minikube for test and learning

    how to set storage class for aliyun, and hope to support minikube for test and learning

    config/samples/apps_v1alpha1_nebulacluster.yaml please add more examples

    opened by wangqia0309 20
  • helm install nebula cluster

    helm install nebula cluster

    opened by veezhang 5
  • fix typo and remove redundant if cases

    fix typo and remove redundant if cases

    A little work:

    1. run go mod tidy to remove unused dependencies
    2. run gofmt -s to add and remove spaces
    3. remove unnecessary if cases
    4. add comments for exported functions
    5. fix typo in UpdateNebualCluster to make FakeClusterControl implement ControlInterface interface
    ready-for-testing 
    opened by hezhizhen 5
  • add more configurable options for pod template

    add more configurable options for pod template

    During the tests of MEG friends, it's found there could be a conflict between nebulaCluster pods and istio-proxy sidecar pods, in order to disable the sidecar, below annotation fields are needed.

    IMG_0546

    While for now, there is no such configuration interface to do so.

    Is it feasible to add configurable options on this kind of k/v pairs via values.yaml ?

    opened by wey-gu 3
  • Update install_guide.md

    Update install_guide.md

    opened by verlocks 2
  • ngctl cmd tool

    ngctl cmd tool

    ngctl is a terminal cmd tool for nebula-operator, it has the following functions:

    • debug // debug a container in the specified pod
    • console // establish a connection to graphd
    • list // list all nebulaclusters
    • cluster-info // print cluster details, contains component status, resources, image versions etc.
    • version // print git commit info
    feature wip 
    opened by MegaByte875 2
  • support envs

    support envs

    • [x] nebula operator
    • [x] nebula cluster
    • [x] support kubernetesClusterDomain
    feature ready-for-testing 
    opened by veezhang 2
  • unable to install nebula-operator on on-premise Rancher v17.17

    unable to install nebula-operator on on-premise Rancher v17.17

    I am receiving the below error but not sure how to resolve this error.

    "transitioning": "error", "transitioningMessage": "failed to install app nebula-operator. Error: unable to build kubernetes objects from release manifest: [unable to recognize "": no matches for kind "Certificate" in version "cert-manager.io/v1", unable to recognize "": no matches for kind "Issuer" in version "cert-manager.io/v1"]",

    opened by norcal230 2
  • custom parameters

    custom parameters

    doc affected enhancement 
    opened by MegaByte875 2
  • ngctl: add check command and doc

    ngctl: add check command and doc

    • [x] add check command
    • [x] support list command to list nebulacluster sub resources
    • [x] add ngctl doc
    • [x] add unit test
    feature ready-for-testing 
    opened by kqzh 2
  • Support data backup&restore feature

    Support data backup&restore feature

    null

    feature 
    opened by abby-cyber 1
  • 期望helm安装能支持config选项

    期望helm安装能支持config选项

    自定义资源上支持修改config,但helm模板并没有支持config选项,期望能加上 微信图片_20210923181619

    opened by zdz1715 1
  • Recovery nebula cluster in crash scenario

    Recovery nebula cluster in crash scenario

    https://discuss.nebula-graph.com.cn/t/topic/5569/20

    enhancement 
    opened by MegaByte875 1
  • It could create resource concurrently

    It could create resource concurrently

    https://github.com/vesoft-inc/nebula-operator/blob/master/pkg/controller/nebulacluster/nebula_cluster_control.go#L90

    could it create the resource concurrently, not create one by one?

    image

    opened by HarrisChu 1
  • enablePVReclaim doesn't work

    enablePVReclaim doesn't work

    1. create a nebulacluster resource by using
    apiVersion: apps.nebula-graph.io/v1alpha1
    kind: NebulaCluster
    metadata:
      name: {nebulacluster_name}
    spec:
      graphd:
        config:
          heartbeat_interval_secs: "1"
        resources:
          requests:
            cpu: "500m"
            memory: "500Mi"
          limits:
            cpu: "1"
            memory: "2Gi"
        replicas: {graphd_num}
        image: vesoft/nebula-graphd
        version: v2-nightly
        service:
          type: NodePort
          externalTrafficPolicy: Local
        storageClaim:
          resources:
            requests:
              storage: 2Gi
          storageClassName: nfs-client
      metad:
        config:
          heartbeat_interval_secs: "1"
        resources:
          requests:
            cpu: "500m"
            memory: "500Mi"
          limits:
            cpu: "1"
            memory: "1Gi"
        replicas: {metad_num}
        image: vesoft/nebula-metad
        version: v2-nightly
        storageClaim:
          resources:
            requests:
              storage: 2Gi
          storageClassName: nfs-client
      storaged:
        config:
          heartbeat_interval_secs: "1"
        resources:
          requests:
            cpu: "500m"
            memory: "500Mi"
          limits:
            cpu: "1"
            memory: "1Gi"
        replicas: {storaged_num}
        image: vesoft/nebula-storaged
        version: v2-nightly
        storageClaim:
          resources:
            requests:
              storage: 1Gi
          storageClassName: nfs-client
      reference:
        name: statefulsets.apps
        version: v1
      schedulerName: default-scheduler
      imagePullPolicy: IfNotPresent
      enablePVReclaim: true
    
    1. delete the nebulacluster

    expected result: delete pvc

    actual result: doesn't delete.

    bug 
    opened by HarrisChu 1
  • why the nebulacluster setup up slowly

    why the nebulacluster setup up slowly

    image

    image

    enhancement 
    opened by HarrisChu 2
  • Clarify add-ons installation instructions

    Clarify add-ons installation instructions

    Summary

    here, it says users can install add-ons, but it's unclear what should happen after the installation. do i need to configure anything for nebula to work with these add-ons?

    Add more detailed documentation on how to configure Nebula to work with these add-ons, how these add-ons work with Nebula, what each of them is for?

    doc affected 
    opened by p-null 4
  • Support ingress for accessing the nebula cluster

    Support ingress for accessing the nebula cluster

    null

    feature 
    opened by MegaByte875 1
  • Add sidecar for nebula logging

    Add sidecar for nebula logging

    currently, we cannot review nebula logs via kubectl logs or other logging system. Add the sidecar for nebula-graphd, nebula-metad, nebula-storaged, so that we can capture the logs via stdout.

    e.g. image

    enhancement 
    opened by HarrisChu 2
Releases(v0.8.0)
  • v0.8.0(Sep 22, 2021)

    Feature

    • Operator is now built with nebula-go v2.5.0,adapt nebula v2.5.0 #67
    • Support pod template labels and annotations #36
    • Provide ngctl terminal tools to facilitate nebula cluster management #39, #38
    • Provide e2e testing framework #9

    Bugfix

    • Fix e2e fails to run due to lost vid_type #45
    • Fix helm charts fails to install while storageClassName is empty #44
    • Fix configure log level cannot take effect  #40
    Source code(tar.gz)
    Source code(zip)
Owner
vesoft inc.
vesoft inc.
An operator to support Haschicorp Vault configuration workflows from within Kubernetes

Vault Config Operator This operator helps set up Vault Configurations. The main intent is to do so such that subsequently pods can consume the secrets

null 0 Oct 18, 2021
A curated list of awesome Kubernetes tools and resources.

Awesome Kubernetes Resources A curated list of awesome Kubernetes tools and resources. Inspired by awesome list and donnemartin/awesome-aws. The Fiery

Tom Huang 913 Oct 23, 2021
The DataStax Kubernetes Operator for Apache Cassandra

Cass Operator The DataStax Kubernetes Operator for Apache Cassandra®. This repository replaces the old datastax/cass-operator for use-cases in the k8s

K8ssandra 51 Oct 19, 2021
Managing your Kubernetes clusters (including public, private, edge, etc) as easily as visiting the Internet

Clusternet Managing Your Clusters (including public, private, hybrid, edge, etc) as easily as Visiting the Internet. Clusternet (Cluster Internet) is

Clusternet 235 Oct 13, 2021
Kubernetes Operator for MySQL NDB Cluster.

MySQL NDB Operator The MySQL NDB Operator is a Kubernetes operator for managing a MySQL NDB Cluster setup inside a Kubernetes Cluster. This is in prev

MySQL 8 Oct 16, 2021
Access your Kubernetes Deployment over the Internet

Kubexpose: Access your Kubernetes Deployment over the Internet Kubexpose makes it easy to access a Kubernetes Deployment over a public URL. It's a Kub

Abhishek Gupta 23 Oct 21, 2021
An operator for managing ephemeral clusters in GKE

Test Cluster Operator for GKE This operator provides an API-driven cluster provisioning for integration and performance testing of software that integ

Isovalent 28 Mar 19, 2021
Lightweight, CRD based envoy control plane for kubernetes

Lighweight, CRD based Envoy control plane for Kubernetes: Implemented as a Kubernetes Operator Deploy and manage an Envoy xDS server using the Discove

null 36 Oct 20, 2021
KinK is a helper CLI that facilitates to manage KinD clusters as Kubernetes pods. Designed to ease clusters up for fast testing with batteries included in mind.

kink A helper CLI that facilitates to manage KinD clusters as Kubernetes pods. Table of Contents kink (KinD in Kubernetes) Introduction How it works ?

Trendyol Open Source 298 Oct 16, 2021
A Kubernetes operator to manage ThousandEyes tests

ThousandEyes Kubernetes Operator ThousandEyes Kubernetes Operator is a Kubernetes operator used to manage ThousandEyes Tests deployed via Kubernetes c

Cisco DevNet 26 Sep 28, 2021
Kubernetes Cluster API Provider AWS

Kubernetes Cluster API Provider AWS Kubernetes-native declarative infrastructure for AWS. What is the Cluster API Provider AWS The Cluster API brings

null 0 Oct 23, 2021
Helm Operator is designed to managed the full lifecycle of Helm charts with Kubernetes CRD resource.

Helm Operator Helm Operator is designed to install and manage Helm charts with Kubernetes CRD resource. Helm Operator does not create the Helm release

Chen Zhiwei 4 Sep 2, 2021
Enable dynamic and seamless Kubernetes multi-cluster topologies

Enable dynamic and seamless Kubernetes multi-cluster topologies Explore the docs » View Demo · Report Bug · Request Feature About the project Liqo is

LiqoTech 439 Oct 23, 2021
The OCI Service Operator for Kubernetes (OSOK) makes it easy to connect and manage OCI services from a cloud native application running in a Kubernetes environment.

OCI Service Operator for Kubernetes Introduction The OCI Service Operator for Kubernetes (OSOK) makes it easy to create, manage, and connect to Oracle

Oracle 9 Sep 24, 2021
The Elastalert Operator is an implementation of a Kubernetes Operator, to easily integrate elastalert with gitops.

Elastalert Operator for Kubernetes The Elastalert Operator is an implementation of a Kubernetes Operator. Getting started Firstly, learn How to use el

null 13 Sep 23, 2021
Kubedd – Check migration issues of Kubernetes Objects while K8s upgrade

Kubedd – Check migration issues of Kubernetes Objects while K8s upgrade

Devtron Labs 95 Oct 20, 2021
👀 A Kubernetes cluster resource sanitizer

Popeye - A Kubernetes Cluster Sanitizer Popeye is a utility that scans live Kubernetes cluster and reports potential issues with deployed resources an

Fernand Galiana 3.1k Oct 16, 2021
Large-scale Kubernetes cluster diagnostic tool.

English | 简体中文 KubeProber What is KubeProber? KubeProber is a diagnostic tool designed for large-scale Kubernetes clusters. It is used to perform diag

Erda 35 Oct 20, 2021
🐶 Kubernetes CLI To Manage Your Clusters In Style!

K9s - Kubernetes CLI To Manage Your Clusters In Style! K9s provides a terminal UI to interact with your Kubernetes clusters. The aim of this project i

Fernand Galiana 13.8k Oct 20, 2021