Skip to content

Commit

Permalink
docs: fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
michelle-0808 committed Dec 31, 2024
1 parent 1770f67 commit dccaf07
Show file tree
Hide file tree
Showing 25 changed files with 276 additions and 220 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ KubeBlocks supports creating two types of ApeCloud MySQL clusters: Standalone an

KubeBlocks implements a `Cluster` CRD to define a cluster. Here is an example of creating a RaftGroup Cluster.

If you only have one node for deploying a RaftGroup Cluster, set `spec.affinity.topologyKeys` as `null`. But for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.
If you only have one node for deploying a RaftGroup Cluster, configure the cluster affinity by setting `spec.schedulingPolicy` or `spec.componentSpecs.schedulingPolicy`. For details, you can refer to the [API docs](https://kubeblocks.io/docs/preview/developer_docs/api-reference/cluster#apps.kubeblocks.io/v1.SchedulingPolicy). But for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

```yaml
cat <<EOF | kubectl apply -f -
Expand Down Expand Up @@ -197,20 +197,16 @@ KubeBlocks supports creating two types of ApeCloud MySQL clusters: Standalone an
Create a Standalone.

```bash
kbcli cluster create apecloud-mysql mycluster --namespace demo
kbcli cluster create apecloud-mysql mycluster --set mode='standalone' --namespace demo
```

Create a RaftGroup Cluster.

```bash
kbcli cluster create apecloud-mysql mycluster --replicas=3 --namespace demo
kbcli cluster create apecloud-mysql mycluster --set mode='raftGroup' --namespace demo
```

If you only have one node for deploying a RaftGroup Cluster, set the `topology-keys` as `null` when creating a RaftGroup Cluster. But you should note that for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

```bash
kbcli cluster create apecloud-mysql mycluster --replicas=3 --topology-keys null --namespace demo
```
If you only have one node for deploying a RaftGroup Cluster, you can configure the cluster affinity by setting `--pod-anti-afffinity`, `--tolerations`, and `--topology-keys` when creating a RaftGroup Cluster. But you should note that for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

2. Verify whether this cluster is created successfully.

Expand Down
118 changes: 86 additions & 32 deletions docs/user_docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,39 +32,95 @@ KubeBlocks supports the management of Elasticsearch. This tutorial illustrates h

<TabItem value="kubectl" label="kubectl" default>

KubeBlocks implements a `Cluster` CRD to define a cluster. Here is an example of creating an Elasticsearch cluster with single node. For more examples, refer to [the GitHub repository](https://github.com/apecloud/kubeblocks-addons/tree/main/examples/elasticsearch).
KubeBlocks implements a `Cluster` CRD to define a cluster. Here is an example of creating an Elasticsearch cluster with multiple nodes. For more examples, refer to [the GitHub repository](https://github.com/apecloud/kubeblocks-addons/tree/main/examples/elasticsearch).

If you only have one node for deploying a cluster with multiple nodes, configure the cluster affinity by setting `spec.schedulingPolicy` or `spec.componentSpecs.schedulingPolicy`. For details, you can refer to the [API docs](https://kubeblocks.io/docs/preview/developer_docs/api-reference/cluster#apps.kubeblocks.io/v1.SchedulingPolicy). But for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

```yaml
cat <<EOF | kubectl apply -f -
apiVersion: apps.kubeblocks.io/v1
kind: Cluster
metadata:
name: mycluster
namespace: demo
name: es-multinode
namespace: default
annotations:
kubeblocks.io/extra-env: '{"mode":"single-node"}'
kubeblocks.io/extra-env: '{"master-roles":"master", "data-roles": "data", "ingest-roles": "ingest", "transform-roles": "transform"}'
spec:
terminationPolicy: Delete
componentSpecs:
- name: mdit
componentDef: elasticsearch-8
serviceVersion: 8.8.2
replicas: 1
resources:
limits:
cpu: "1"
memory: "2Gi"
requests:
cpu: "1"
memory: "2Gi"
volumeClaimTemplates:
- name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
- name: master
componentDef: elasticsearch-8-1.0.0
replicas: 3
resources:
limits:
cpu: '0.5'
memory: 2Gi
requests:
cpu: '0.5'
memory: 2Gi
volumeClaimTemplates:
- name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
- name: data
componentDef: elasticsearch-8-1.0.0
replicas: 3
resources:
limits:
cpu: '0.5'
memory: 2Gi
requests:
cpu: '0.5'
memory: 2Gi
volumeClaimTemplates:
- name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
- name: ingest
componentDef: elasticsearch-8-1.0.0
replicas: 1
resources:
limits:
cpu: '0.5'
memory: 2Gi
requests:
cpu: '0.5'
memory: 2Gi
volumeClaimTemplates:
- name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
- name: transform
componentDef: elasticsearch-8-1.0.0
replicas: 1
resources:
limits:
cpu: '0.5'
memory: 2Gi
requests:
cpu: '0.5'
memory: 2Gi
volumeClaimTemplates:
- name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
EOF
```

| Field | Definition |
Expand Down Expand Up @@ -101,23 +157,21 @@ kubectl get cluster mycluster -n demo -o yaml

***Steps***

1. Execute the following command to create an Elasticsearch cluster.
1. Execute the following command to create an Elasticsearch cluster with multiple nodes.

```bash
kbcli cluster create elasticsearch mycluster -n demo
```

:::note

If you want to customize your cluster specifications, kbcli provides various options, such as setting cluster version, termination policy, CPU, and memory. You can view these options by adding `--help` or `-h` flag.
If you want to customize your cluster specifications, kbcli provides various options, such as setting cluster version, termination policy, CPU, and memory. You can view these options by adding `--help` or `-h` flag.

```bash
kbcli cluster create elasticsearch --help
```bash
kbcli cluster create elasticsearch --help

kbcli cluster create elasticsearch -h
```
kbcli cluster create elasticsearch -h
```

:::
If you only have one node for deploying a cluster with multiple nodes, you can configure the cluster affinity by setting `--pod-anti-afffinity`, `--tolerations`, and `--topology-keys` when creating a cluster. But you should note that for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

2. Check whether the cluster is created.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ This document shows how to create a Kafka cluster.

<TabItem value="kubectl" label="kubectl" default>

1. Create a Kafka cluster. If you only have one node for deploying a cluster with multiple replicas, set `spec.componentSpecs.affinity.topologyKeys` as `null`. But for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.
1. Create a Kafka cluster. If you only have one node for deploying a cluster with multiple replicas, configure the cluster affinity by setting `spec.schedulingPolicy` or `spec.componentSpecs.schedulingPolicy`. For details, you can refer to the [API docs](https://kubeblocks.io/docs/preview/developer_docs/api-reference/cluster#apps.kubeblocks.io/v1.SchedulingPolicy). But for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

For more cluster examples, refer to [the GitHub repository](https://github.com/apecloud/kubeblocks-addons/tree/main/examples/kafka).

Expand Down Expand Up @@ -253,6 +253,8 @@ This document shows how to create a Kafka cluster.
kbcli cluster create kafka -h
```

If you only have one node for deploying a cluster with multiple replicas, you can configure the cluster affinity by setting `--pod-anti-afffinity`, `--tolerations`, and `--topology-keys` when creating a cluster. But you should note that for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

2. Verify whether this cluster is created successfully.

```bash
Expand Down
17 changes: 8 additions & 9 deletions docs/user_docs/kubeblocks-for-milvus/manage-milvus.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ This tutorial illustrates how to create and manage a Milvus cluster by `kbcli`,

<TabItem value="kubectl" label="kubectl" default>

KubeBlocks implements a `Cluster` CRD to define a cluster. Here is an example of creating a Milvus cluster.
KubeBlocks implements a `Cluster` CRD to define a cluster. Here is an example of creating a Milvus cluster. If you only have one node for deploying a cluster with multiple replicas, configure the cluster affinity by setting `spec.schedulingPolicy` or `spec.componentSpecs.schedulingPolicy`. For details, you can refer to the [API docs](https://kubeblocks.io/docs/preview/developer_docs/api-reference/cluster#apps.kubeblocks.io/v1.SchedulingPolicy). But for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.


```yaml
cat <<EOF | kubectl apply -f -
Expand Down Expand Up @@ -301,17 +302,15 @@ kubectl get cluster mycluster -n demo -o yaml
kbcli cluster create mycluster --cluster-definition=milvus-2.3.2 -n demo
```

:::note

If you want to customize your cluster specifications, `kbcli` provides various options, such as setting cluster version, termination policy, CPU, and memory. You can view these options by adding `--help` or `-h` flag.
If you want to customize your cluster specifications, `kbcli` provides various options, such as setting cluster version, termination policy, CPU, and memory. You can view these options by adding `--help` or `-h` flag.

```bash
kbcli cluster create milvus --help
```bash
kbcli cluster create milvus --help

kbcli cluster create milvus -h
```
kbcli cluster create milvus -h
```

:::
If you only have one node for deploying a cluster with multiple replicas, you can configure the cluster affinity by setting `--pod-anti-afffinity`, `--tolerations`, and `--topology-keys` when creating a cluster. But you should note that for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

2. Check whether the cluster is created successfully.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ KubeBlocks supports creating two types of MongoDB clusters: Standalone and Repli

KubeBlocks implements a `Cluster` CRD to define a cluster. Here is an example of creating a MongoDB Standalone.

If you only have one node for deploying a ReplicaSet Cluster, set `spec.affinity.topologyKeys` as `null`. But for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.
If you only have one node for deploying a ReplicaSet Cluster, configure the cluster affinity by setting `spec.schedulingPolicy` or `spec.componentSpecs.schedulingPolicy`. For details, you can refer to the [API docs](https://kubeblocks.io/docs/preview/developer_docs/api-reference/cluster#apps.kubeblocks.io/v1.SchedulingPolicy). But for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

```yaml
cat <<EOF | kubectl apply -f -
Expand Down Expand Up @@ -191,6 +191,8 @@ KubeBlocks supports creating two types of MongoDB clusters: Standalone and Repli
kbcli cluster create mongodb -h
```

If you only have one node for deploying a cluster with multiple replicas, you can configure the cluster affinity by setting `--pod-anti-afffinity`, `--tolerations`, and `--topology-keys` when creating a cluster. But you should note that for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

2. Verify whether this cluster is created successfully.

```bash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ KubeBlocks supports creating two types of MySQL clusters: Standalone and Replica

KubeBlocks implements a `Cluster` CRD to define a cluster. Here is an example of creating a Replication Cluster.

If you only have one node for deploying a Replication Cluster, set `spec.affinity.topologyKeys` as `null`. But for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.
If you only have one node for deploying a Replication Cluster, configure the cluster affinity by setting `spec.schedulingPolicy` or `spec.componentSpecs.schedulingPolicy`. For details, you can refer to the [API docs](https://kubeblocks.io/docs/preview/developer_docs/api-reference/cluster#apps.kubeblocks.io/v1.SchedulingPolicy). But for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

```yaml
cat <<EOF | kubectl apply -f -
Expand Down Expand Up @@ -190,11 +190,7 @@ KubeBlocks supports creating two types of MySQL clusters: Standalone and Replica
kbcli cluster create mysql -h
```

If you only have one node for deploying a Replication Cluster, set the `--topology-keys` as `null` when creating a Cluster. But you should note that for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

```bash
kbcli cluster create mysql mycluster --topology-keys null -n demo
```
If you only have one node for deploying a Replication Cluster, you can configure the cluster affinity by setting `--pod-anti-afffinity`, `--tolerations`, and `--topology-keys` when creating a Replication Cluster. But you should note that for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

2. Verify whether this cluster is created successfully.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ KubeBlocks supports creating two types of PostgreSQL clusters: Standalone and Re

<TabItem value="kubectl" label="kubectl" default>

1. Create a PostgreSQL cluster.
1. Create a PostgreSQL cluster. If you only have one node for deploying a Replication Cluster, configure the cluster affinity by setting `spec.schedulingPolicy` or `spec.componentSpecs.schedulingPolicy`. For details, you can refer to the [API docs](https://kubeblocks.io/docs/preview/developer_docs/api-reference/cluster#apps.kubeblocks.io/v1.SchedulingPolicy). But for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

KubeBlocks implements a `Cluster` CRD to define a cluster. Here is an example of creating a Replication.

Expand Down Expand Up @@ -211,11 +211,7 @@ KubeBlocks supports creating two types of PostgreSQL clusters: Standalone and Re
kbcli cluster create postgresql mycluster --replicas=2 -n demo
```

If you only have one node for deploying a Replication Cluster, set the `--topology-keys` as `null` when creating a Replication Cluster. But you should note that for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

```bash
kbcli cluster create postgresql mycluster --replicas=2 --topology-keys=null -n demo
```
If you only have one node for deploying a RaftGroup Cluster, you can configure the cluster affinity by setting `--pod-anti-afffinity`, `--tolerations`, and `--topology-keys` when creating a Replication Cluster. But you should note that for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

2. Verify whether this cluster is created successfully.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ Refer to the [Pulsar official document](https://pulsar.apache.org/docs/3.1.x/) f

## Create Pulsar cluster

1. Create a Pulsar cluster in basic mode. For other cluster modes, check out the examples provided in [the GitHub repository](https://github.com/apecloud/kubeblocks-addons/tree/main/examples/pulsar).
1. Create a Pulsar cluster in basic mode. For other cluster modes, check out the examples provided in [the GitHub repository](https://github.com/apecloud/kubeblocks-addons/tree/main/examples/pulsar). If you only have one node for deploying a Pulsar Cluster, configure the cluster affinity by setting `spec.schedulingPolicy` or `spec.componentSpecs.schedulingPolicy`. For details, you can refer to the [API docs](https://kubeblocks.io/docs/preview/developer_docs/api-reference/cluster#apps.kubeblocks.io/v1.SchedulingPolicy). But for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

```yaml
cat <<EOF | kubectl apply -f -
Expand Down
6 changes: 3 additions & 3 deletions docs/user_docs/kubeblocks-for-qdrant/manage-qdrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ KubeBlocks supports the management of Qdrant. This tutorial illustrates how to c

<TabItem value="kubectl" label="kubectl" default>

KubeBlocks implements a `Cluster` CRD to define a cluster. Here is an example of creating a Qdrant Replication cluster. Primary and Secondary are distributed on different nodes by default. But if you only have one node for deploying a Replication Cluster, set `spec.affinity.topologyKeys` as `null`.
KubeBlocks implements a `Cluster` CRD to define a cluster. Here is an example of creating a Qdrant Replication cluster. Primary and Secondary are distributed on different nodes by default. But if you only have one node for deploying a Replication Cluster, configure the cluster affinity by setting `spec.schedulingPolicy` or `spec.componentSpecs.schedulingPolicy`. For details, you can refer to the [API docs](https://kubeblocks.io/docs/preview/developer_docs/api-reference/cluster#apps.kubeblocks.io/v1.SchedulingPolicy). But for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

```yaml
cat <<EOF | kubectl apply -f -
Expand All @@ -43,14 +43,12 @@ kind: Cluster
metadata:
name: mycluster
namespace: demo
annotations: {}
spec:
terminationPolicy: Delete
clusterDef: qdrant
topology: cluster
componentSpecs:
- name: qdrant
annotations: {}
serviceVersion: 1.10.0
replicas: 3
resources:
Expand Down Expand Up @@ -119,6 +117,8 @@ kubectl get cluster mycluster -n demo -o yaml
kbcli cluster create qdrant -h
```

If you only have one node for deploying a cluster with multiple replicas, you can configure the cluster affinity by setting `--pod-anti-afffinity`, `--tolerations`, and `--topology-keys` when creating a cluster. But you should note that for a production environment, it is not recommended to deploy all replicas on one node, which may decrease the cluster availability.

2. Check whether the cluster is created.

```bash
Expand Down
Loading

0 comments on commit dccaf07

Please sign in to comment.