-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5ccf0e1
commit 66beefc
Showing
1 changed file
with
193 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
# Deploy Nebula Operator | ||
|
||
You can deploy Nebula Operator with [Helm](https://helm.sh/). | ||
|
||
## Background | ||
|
||
[Nebula Operator](1.introduction-to-nebula-operator.md) 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](https://kubernetes.io) | \>= 1.16 | | ||
| [Helm](https://helm.sh) | \>= 3.2.0 | | ||
| [CoreDNS](https://github.com/coredns/coredns) | \>= 1.6.0 | | ||
| [CertManager](https://cert-manager.io) | \>= 1.2.0 | | ||
| [OpenKruise](https://openkruise.io) | \>= 0.8.0 | | ||
|
||
If using a role-based access control policy, you need to enable [RBAC](https://kubernetes.io/docs/admin/authorization/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](https://coredns.io/) | ||
|
||
CoreDNS is a flexible and scalable DNS server that is [installed](https://github.com/coredns/deployment/tree/master/kubernetes) 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](https://cert-manager.io/) | ||
|
||
!!! 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](https://cert-manager.io/docs/installation/kubernetes/). | ||
|
||
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](https://openkruise.io/en-us/) | ||
|
||
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](https://openkruise.io/en-us/docs/installation.html). | ||
|
||
## Steps | ||
|
||
### Install Nebula Operator | ||
|
||
1. Add the Nebula Operator chart repository to Helm. | ||
|
||
```bash | ||
helm repo add nebula-operator https://vesoft-inc.github.io/nebula-operator/charts | ||
``` | ||
|
||
2. Update information of available charts locally from chart repositories. | ||
|
||
```bash | ||
helm repo update | ||
``` | ||
|
||
For more information about `helm repo`, see [Helm Repo](https://helm.sh/docs/helm/helm_repo/). | ||
|
||
3. Install Nebula Operator. | ||
|
||
```bash | ||
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: | ||
|
||
```yaml | ||
[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](https://helm.sh/docs/intro/using_helm/#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): | ||
|
||
```bash | ||
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](https://helm.sh/docs/helm/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. | ||
|
||
```bash | ||
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. | ||
|
||
```bash | ||
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. | ||
|
||
```bash | ||
helm uninstall nebula-operator --namespace=<nebula-operator-system> | ||
``` | ||
|
||
2. Delete CRD. | ||
|
||
```bash | ||
kubectl delete crd nebulaclusters.apps.nebula-graph.io | ||
``` | ||
|
||
## What to do next | ||
|
||
Automate the deployment of Nebula Graph clusters with Nebula Operator. For more information, see [Deploy Nebula Graph Clusters with Kubectl](3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md) or [Deploy Nebula Graph Clusters with Helm](3.deploy-nebula-graph-cluster/3.2create-cluster-with-helm.md). |