Skip to content

Commit

Permalink
docs: update cluster create cli command, yaml examples and monitoring…
Browse files Browse the repository at this point in the history
… docs (#8706)
  • Loading branch information
michelle-0808 authored Jan 6, 2025
1 parent 54fb8ee commit 9f3532d
Show file tree
Hide file tree
Showing 24 changed files with 1,687 additions and 1,013 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,28 +115,26 @@ KubeBlocks supports creating two types of ApeCloud MySQL clusters: Standalone an
name: mycluster
namespace: demo
spec:
clusterDefinitionRef: apecloud-mysql
clusterVersionRef: ac-mysql-8.0.30
terminationPolicy: Delete
affinity:
podAntiAffinity: Preferred
topologyKeys:
- kubernetes.io/hostname
tolerations:
componentSpecs:
- name: mysql
componentDef: apecloud-mysql
affinity:
podAntiAffinity: Preferred
topologyKeys:
- kubernetes.io/hostname
tenancy: SharedNode
tolerations:
- key: kb-data
operator: Equal
value: 'true'
effect: NoSchedule
componentSpecs:
- name: mysql
componentDefRef: mysql
enabledLogs:
- error
- general
- slow
disableExporter: true
replicas: 3
serviceAccountName: kb-acmysql-cluster
replicas: 2
resources:
limits:
cpu: '0.5'
Expand All @@ -157,8 +155,6 @@ KubeBlocks supports creating two types of ApeCloud MySQL clusters: Standalone an

| Field | Definition |
|---------------------------------------|--------------------------------------|
| `spec.clusterDefinitionRef` | It specifies the name of the ClusterDefinition for creating a specific type of cluster. |
| `spec.clusterVersionRef` | It is the name of the cluster version CRD that defines the cluster version. |
| `spec.terminationPolicy` | It is the policy of cluster termination. The default value is `Delete`. Valid values are `DoNotTerminate`, `Delete`, `WipeOut`. For the detailed definition, you can refer to [Termination Policy](./delete-mysql-cluster.md#termination-policy). |
| `spec.affinity` | It defines a set of node affinity scheduling rules for the cluster's Pods. This field helps control the placement of Pods on nodes within the cluster. |
| `spec.affinity.podAntiAffinity` | It specifies the anti-affinity level of Pods within a component. It determines how pods should spread across nodes to improve availability and performance. |
Expand Down
91 changes: 73 additions & 18 deletions docs/user_docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,35 +39,92 @@ cat <<EOF | kubectl apply -f -
apiVersion: apps.kubeblocks.io/v1alpha1
kind: Cluster
metadata:
annotations:
kubeblocks.io/extra-env: '{"mdit-roles":"master,data,ingest,transform","mode":"multi-node"}'
labels:
app.kubernetes.io/instance: mycluster
app.kubernetes.io/version: 8.8.2
helm.sh/chart: elasticsearch-cluster-0.9.0
name: mycluster
namespace: demo
annotations:
kubeblocks.io/extra-env: '{"master-roles":"master", "data-roles": "data", "ingest-roles": "ingest", "transform-roles": "transform"}'
spec:
terminationPolicy: Delete
affinity:
podAntiAffinity: Required
tenancy: SharedNode
podAntiAffinity: Preferred
topologyKeys:
- kubernetes.io/hostname
tenancy: SharedNode
tolerations:
- key: kb-data
operator: Equal
value: 'true'
effect: NoSchedule
componentSpecs:
- componentDef: elasticsearch-8
- name: master
componentDef: elasticsearch
disableExporter: true
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: data
componentDef: elasticsearch
disableExporter: true
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: ingest
componentDef: elasticsearch
disableExporter: true
name: mdit
replicas: 3
replicas: 1
resources:
limits:
cpu: "1"
cpu: '0.5'
memory: 2Gi
requests:
cpu: "1"
cpu: '0.5'
memory: 2Gi
serviceAccountName: kb-mycluster
serviceVersion: 8.8.2
volumeClaimTemplates:
- name: data
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 20Gi
services: null
- name: transform
componentDef: elasticsearch
disableExporter: true
replicas: 1
resources:
limits:
cpu: '0.5'
memory: 2Gi
requests:
cpu: '0.5'
memory: 2Gi
volumeClaimTemplates:
- name: data
spec:
Expand All @@ -76,7 +133,6 @@ spec:
resources:
requests:
storage: 20Gi
terminationPolicy: Delete
EOF
```

Expand Down Expand Up @@ -142,7 +198,7 @@ kbcli cluster create elasticsearch -h
3. Check the cluster details.

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

</TabItem>
Expand Down Expand Up @@ -410,7 +466,6 @@ From v0.9.0, besides replicas, KubeBlocks also supports scaling in and out insta
componentSpecs:
- name: mdit
componentDef: elasticsearch
serviceAccountName: null
disableExporter: true
replicas: 1
resources: # Change the values of resources
Expand Down
Loading

0 comments on commit 9f3532d

Please sign in to comment.