-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update 3.1create-cluster-with-kubectl.md (#1359)
* Update 3.1create-cluster-with-kubectl.md * Update 3.1create-cluster-with-kubectl.md Co-authored-by: cooper-lzy <[email protected]>
- Loading branch information
1 parent
854cb8f
commit 5ab42d0
Showing
1 changed file
with
220 additions
and
75 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 |
---|---|---|
|
@@ -6,7 +6,12 @@ | |
|
||
## Prerequisites | ||
|
||
[Install Nebula Operator](../2.deploy-nebula-operator.md) | ||
- [Install Nebula Operator](../2.deploy-nebula-operator.md) | ||
- You have prepared the license file for Nebula Graph Enterprise Edition clusters. | ||
|
||
!!! enterpriseonly | ||
|
||
The license file is required only when creating a Nebula Graph Enterprise Edition cluster. | ||
|
||
## Create clusters | ||
|
||
|
@@ -16,79 +21,195 @@ The following example shows how to create a Nebula Graph cluster by creating a c | |
|
||
The file contents are as follows: | ||
|
||
```yaml | ||
apiVersion: apps.nebula-graph.io/v1alpha1 | ||
kind: NebulaCluster | ||
metadata: | ||
name: nebula | ||
spec: | ||
graphd: | ||
resources: | ||
requests: | ||
cpu: "500m" | ||
memory: "500Mi" | ||
limits: | ||
cpu: "1" | ||
memory: "1Gi" | ||
replicas: 1 | ||
image: vesoft/nebula-graphd | ||
version: {{nebula.tag}} | ||
service: | ||
type: NodePort | ||
externalTrafficPolicy: Local | ||
logVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
storageClassName: gp2 | ||
metad: | ||
resources: | ||
requests: | ||
cpu: "500m" | ||
memory: "500Mi" | ||
limits: | ||
cpu: "1" | ||
memory: "1Gi" | ||
replicas: 1 | ||
image: vesoft/nebula-metad | ||
version: {{nebula.tag}} | ||
dataVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
storageClassName: gp2 | ||
logVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
storageClassName: gp2 | ||
storaged: | ||
resources: | ||
requests: | ||
cpu: "500m" | ||
memory: "500Mi" | ||
limits: | ||
cpu: "1" | ||
memory: "1Gi" | ||
replicas: 3 | ||
image: vesoft/nebula-storaged | ||
version: {{nebula.tag}} | ||
dataVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
storageClassName: gp2 | ||
logVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
storageClassName: gp2 | ||
reference: | ||
name: statefulsets.apps | ||
version: v1 | ||
schedulerName: default-scheduler | ||
imagePullPolicy: Always | ||
``` | ||
=== "Community Edition" | ||
|
||
```yaml | ||
apiVersion: apps.nebula-graph.io/v1alpha1 | ||
kind: NebulaCluster | ||
metadata: | ||
name: nebula | ||
spec: | ||
graphd: | ||
resources: | ||
requests: | ||
cpu: "500m" | ||
memory: "500Mi" | ||
limits: | ||
cpu: "1" | ||
memory: "1Gi" | ||
replicas: 1 | ||
image: vesoft/nebula-graphd | ||
version: {{nebula.tag}} | ||
service: | ||
type: NodePort | ||
externalTrafficPolicy: Local | ||
logVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
storageClassName: gp2 | ||
metad: | ||
resources: | ||
requests: | ||
cpu: "500m" | ||
memory: "500Mi" | ||
limits: | ||
cpu: "1" | ||
memory: "1Gi" | ||
replicas: 1 | ||
image: vesoft/nebula-metad | ||
version: {{nebula.tag}} | ||
dataVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
storageClassName: gp2 | ||
logVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
storageClassName: gp2 | ||
storaged: | ||
resources: | ||
requests: | ||
cpu: "500m" | ||
memory: "500Mi" | ||
limits: | ||
cpu: "1" | ||
memory: "1Gi" | ||
replicas: 3 | ||
image: vesoft/nebula-storaged | ||
version: {{nebula.tag}} | ||
dataVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
storageClassName: gp2 | ||
logVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
storageClassName: gp2 | ||
reference: | ||
name: statefulsets.apps | ||
version: v1 | ||
schedulerName: default-scheduler | ||
imagePullPolicy: Always | ||
``` | ||
|
||
=== "Enterprise Edition" | ||
|
||
```yaml | ||
# Contact our sales team to get a complete Nebula Graph Enterprise Edition cluster YAML example. | ||
|
||
apiVersion: apps.nebula-graph.io/v1alpha1 | ||
kind: NebulaCluster | ||
metadata: | ||
annotations: | ||
nebula-graph.io/owner: test | ||
name: nebula | ||
spec: | ||
enablePVReclaim: true | ||
graphd: | ||
readinessProbe: | ||
failureThreshold: 3 | ||
httpGet: | ||
path: /status | ||
port: 19669 | ||
scheme: HTTP | ||
initialDelaySeconds: 40 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 10 | ||
image: reg.vesoft-inc.com/vesoft-ent/nebula-graphd | ||
logVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
storageClassName: fast-disks | ||
replicas: 1 | ||
resources: | ||
limits: | ||
cpu: "1" | ||
memory: 1Gi | ||
requests: | ||
cpu: 500m | ||
memory: 500Mi | ||
version: {{nebula.tag}} | ||
imagePullPolicy: Always | ||
imagePullSecrets: | ||
- name: vesoft | ||
metad: | ||
license: | ||
secretName: nebula-license | ||
licenseKey: nebula.license | ||
readinessProbe: | ||
failureThreshold: 3 | ||
httpGet: | ||
path: /status | ||
port: 19559 | ||
scheme: HTTP | ||
initialDelaySeconds: 5 | ||
periodSeconds: 5 | ||
successThreshold: 1 | ||
timeoutSeconds: 5 | ||
image: reg.vesoft-inc.com/vesoft-ent/nebula-metad | ||
logVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
storageClassName: fast-disks | ||
dataVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
storageClassName: fast-disks | ||
replicas: 1 | ||
resources: | ||
limits: | ||
cpu: "1" | ||
memory: 1Gi | ||
requests: | ||
cpu: 500m | ||
memory: 500Mi | ||
version: {{nebula.tag}} | ||
reference: | ||
name: statefulsets.apps | ||
version: v1 | ||
schedulerName: default-scheduler | ||
storaged: | ||
readinessProbe: | ||
failureThreshold: 3 | ||
httpGet: | ||
path: /status | ||
port: 19779 | ||
scheme: HTTP | ||
initialDelaySeconds: 40 | ||
periodSeconds: 10 | ||
successThreshold: 1 | ||
timeoutSeconds: 5 | ||
image: reg.vesoft-inc.com/vesoft-ent/nebula-storaged | ||
logVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
storageClassName: fast-disks | ||
dataVolumeClaim: | ||
resources: | ||
requests: | ||
storage: 2Gi | ||
storageClassName: fast-disks | ||
replicas: 3 | ||
resources: | ||
limits: | ||
cpu: "1" | ||
memory: 1Gi | ||
requests: | ||
cpu: 500m | ||
memory: 500Mi | ||
version: {{nebula.tag}} | ||
enableAutoBalance: true | ||
``` | ||
|
||
The parameters in the file are described as follows: | ||
|
||
|
@@ -113,6 +234,11 @@ The following example shows how to create a Nebula Graph cluster by creating a c | |
| `spec.reference.name` | - | The name of the dependent controller. | | ||
| `spec.schedulerName` | - | The scheduler name. | | ||
| `spec.imagePullPolicy` | The image policy to pull the Nebula Graph image. For details, see [Image pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy). | The image pull policy in Kubernetes. | | ||
| `spec.metad.license` | - | The configuration of the license for creating a Nebula Graph Enterprise Edition cluster. | | ||
|
||
!!! enterpriseonly | ||
|
||
Make sure that you have access to Nebula Graph Enterprise Edition images before pulling the image. For details, contact our sales team ([[email protected]](mailto:[email protected])) | ||
|
||
2. Create a Nebula Graph cluster. | ||
|
||
|
@@ -126,7 +252,26 @@ The following example shows how to create a Nebula Graph cluster by creating a c | |
nebulacluster.apps.nebula-graph.io/nebula created | ||
``` | ||
|
||
3. Check the status of the Nebula Graph cluster. | ||
3. Configure the license for the Enterprise Edition cluster. | ||
|
||
!!! enterpriseonly | ||
|
||
- This step is required only for creating a Nebula Grpah Enterprise Edition cluster. | ||
|
||
- Ignore this step if you are creating a Nebula Graph Community Edition cluster. | ||
|
||
|
||
```bash | ||
kubectl create secret generic nebula-license --from-file=nebula.license | ||
``` | ||
|
||
To check the details of the license, run the following command: | ||
|
||
```bash | ||
kubectl get secrets nebula-license -o yaml | ||
``` | ||
|
||
4. Check the status of the Nebula Graph cluster. | ||
|
||
```bash | ||
kubectl get nebulaclusters.apps.nebula-graph.io nebula | ||
|