diff --git a/docs-2.0/nebula-operator/3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md b/docs-2.0/nebula-operator/3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md index 03ca5655912..03cef4ef651 100644 --- a/docs-2.0/nebula-operator/3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md +++ b/docs-2.0/nebula-operator/3.deploy-nebula-graph-cluster/3.1create-cluster-with-kubectl.md @@ -6,7 +6,12 @@ ## 前提条件 -[安装 Nebula Operator](../2.deploy-nebula-operator.md) +- [安装 Nebula Operator](../2.deploy-nebula-operator.md) +- 准备相应的 License 文件 + + !!! enterpriseonly + + 只有当创建的 Nebula Graph 集群是企业版本时,才需要提供 License 文件。 ## 创建集群 @@ -14,81 +19,194 @@ 1. 创建名为`apps_v1alpha1_nebulacluster.yaml`的文件。 - 示例文件的内容如下: + === "社区版集群示例" + + ```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 + ``` + + === "企业版集群示例" + + ```yaml + 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 + ``` - ```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 - ``` 参数描述如下: @@ -113,8 +231,13 @@ | `spec.reference.name` | - | 依赖的控制器名称。 | | `spec.schedulerName` | - | 调度器名称。 | | `spec.imagePullPolicy` | Nebula Graph 镜像的拉取策略。关于拉取策略详情,请参考 [Image pull policy](https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy)。 | 镜像拉取策略。 | + | `spec.metad.license` | - | 创建企业版 Nebula Graph 集群所需的 License 配置。 | -1. 创建 Nebula Graph 集群。 + !!! enterpriseonly + + 拉取企业版 Nebula Graph 集群镜像前,请确保已联系销售人员([inqury@vesoft.com](mailto:inqury@vesoft.com))获取企业版 Nebula Graph 集群的镜像信息。 + +2. 创建 Nebula Graph 集群。 ```bash kubectl create -f apps_v1alpha1_nebulacluster.yaml @@ -126,7 +249,25 @@ nebulacluster.apps.nebula-graph.io/nebula created ``` -3. 查看 Nebula Graph 集群状态。 +3. 配置集群 License。 + + !!! enterpriseonly + + - 此步骤只适用于创建企业版 Nebula Graph集群。 + + - 创建社区版 Nebula Graph 集群时,忽略此步骤。 + + ```bash + kubectl create secret generic nebula-license --from-file=nebula.license + ``` + + 查看集群 License 信息: + + ```bash + kubectl get secrets nebula-license -o yaml + ``` + +4. 查看 Nebula Graph 集群状态。 ```bash kubectl get nebulaclusters.apps.nebula-graph.io nebula diff --git a/mkdocs.yml b/mkdocs.yml index 3487525b8f5..bc88335dacc 100755 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -31,6 +31,7 @@ theme: features: - navigation.top - header.autohide + - content.tabs.link language: 'zh' extra_css: @@ -57,6 +58,8 @@ markdown_extensions: generic: true - pymdownx.caret - pymdownx.tilde + - pymdownx.superfences + - pymdownx.tabbed # Plugins plugins: