Skip to content

Commit 9f3532d

Browse files
docs: update cluster create cli command, yaml examples and monitoring docs (#8706)
1 parent 54fb8ee commit 9f3532d

File tree

24 files changed

+1687
-1013
lines changed

24 files changed

+1687
-1013
lines changed

docs/user_docs/kubeblocks-for-apecloud-mysql/cluster-management/create-and-connect-an-apecloud-mysql-cluster.md

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -115,28 +115,26 @@ KubeBlocks supports creating two types of ApeCloud MySQL clusters: Standalone an
115115
name: mycluster
116116
namespace: demo
117117
spec:
118-
clusterDefinitionRef: apecloud-mysql
119-
clusterVersionRef: ac-mysql-8.0.30
120118
terminationPolicy: Delete
121-
affinity:
122-
podAntiAffinity: Preferred
123-
topologyKeys:
124-
- kubernetes.io/hostname
125-
tolerations:
119+
componentSpecs:
120+
- name: mysql
121+
componentDef: apecloud-mysql
122+
affinity:
123+
podAntiAffinity: Preferred
124+
topologyKeys:
125+
- kubernetes.io/hostname
126+
tenancy: SharedNode
127+
tolerations:
126128
- key: kb-data
127129
operator: Equal
128130
value: 'true'
129131
effect: NoSchedule
130-
componentSpecs:
131-
- name: mysql
132-
componentDefRef: mysql
133132
enabledLogs:
134133
- error
135134
- general
136135
- slow
137136
disableExporter: true
138-
replicas: 3
139-
serviceAccountName: kb-acmysql-cluster
137+
replicas: 2
140138
resources:
141139
limits:
142140
cpu: '0.5'
@@ -157,8 +155,6 @@ KubeBlocks supports creating two types of ApeCloud MySQL clusters: Standalone an
157155

158156
| Field | Definition |
159157
|---------------------------------------|--------------------------------------|
160-
| `spec.clusterDefinitionRef` | It specifies the name of the ClusterDefinition for creating a specific type of cluster. |
161-
| `spec.clusterVersionRef` | It is the name of the cluster version CRD that defines the cluster version. |
162158
| `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). |
163159
| `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. |
164160
| `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. |

docs/user_docs/kubeblocks-for-elasticsearch/manage-elasticsearch.md

Lines changed: 73 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,35 +39,92 @@ cat <<EOF | kubectl apply -f -
3939
apiVersion: apps.kubeblocks.io/v1alpha1
4040
kind: Cluster
4141
metadata:
42-
annotations:
43-
kubeblocks.io/extra-env: '{"mdit-roles":"master,data,ingest,transform","mode":"multi-node"}'
44-
labels:
45-
app.kubernetes.io/instance: mycluster
46-
app.kubernetes.io/version: 8.8.2
47-
helm.sh/chart: elasticsearch-cluster-0.9.0
4842
name: mycluster
4943
namespace: demo
44+
annotations:
45+
kubeblocks.io/extra-env: '{"master-roles":"master", "data-roles": "data", "ingest-roles": "ingest", "transform-roles": "transform"}'
5046
spec:
47+
terminationPolicy: Delete
5148
affinity:
52-
podAntiAffinity: Required
53-
tenancy: SharedNode
49+
podAntiAffinity: Preferred
5450
topologyKeys:
5551
- kubernetes.io/hostname
52+
tenancy: SharedNode
53+
tolerations:
54+
- key: kb-data
55+
operator: Equal
56+
value: 'true'
57+
effect: NoSchedule
5658
componentSpecs:
57-
- componentDef: elasticsearch-8
59+
- name: master
60+
componentDef: elasticsearch
61+
disableExporter: true
62+
replicas: 1
63+
resources:
64+
limits:
65+
cpu: '0.5'
66+
memory: 2Gi
67+
requests:
68+
cpu: '0.5'
69+
memory: 2Gi
70+
volumeClaimTemplates:
71+
- name: data
72+
spec:
73+
accessModes:
74+
- ReadWriteOnce
75+
resources:
76+
requests:
77+
storage: 20Gi
78+
- name: data
79+
componentDef: elasticsearch
80+
disableExporter: true
81+
replicas: 1
82+
resources:
83+
limits:
84+
cpu: '0.5'
85+
memory: 2Gi
86+
requests:
87+
cpu: '0.5'
88+
memory: 2Gi
89+
volumeClaimTemplates:
90+
- name: data
91+
spec:
92+
accessModes:
93+
- ReadWriteOnce
94+
resources:
95+
requests:
96+
storage: 20Gi
97+
- name: ingest
98+
componentDef: elasticsearch
5899
disableExporter: true
59-
name: mdit
60-
replicas: 3
100+
replicas: 1
61101
resources:
62102
limits:
63-
cpu: "1"
103+
cpu: '0.5'
64104
memory: 2Gi
65105
requests:
66-
cpu: "1"
106+
cpu: '0.5'
67107
memory: 2Gi
68-
serviceAccountName: kb-mycluster
69-
serviceVersion: 8.8.2
108+
volumeClaimTemplates:
109+
- name: data
110+
spec:
111+
accessModes:
112+
- ReadWriteOnce
113+
resources:
114+
requests:
115+
storage: 20Gi
70116
services: null
117+
- name: transform
118+
componentDef: elasticsearch
119+
disableExporter: true
120+
replicas: 1
121+
resources:
122+
limits:
123+
cpu: '0.5'
124+
memory: 2Gi
125+
requests:
126+
cpu: '0.5'
127+
memory: 2Gi
71128
volumeClaimTemplates:
72129
- name: data
73130
spec:
@@ -76,7 +133,6 @@ spec:
76133
resources:
77134
requests:
78135
storage: 20Gi
79-
terminationPolicy: Delete
80136
EOF
81137
```
82138

@@ -142,7 +198,7 @@ kbcli cluster create elasticsearch -h
142198
3. Check the cluster details.
143199

144200
```bash
145-
kbcli cluster describe elasticsearch -n demo
201+
kbcli cluster describe mycluster -n demo
146202
```
147203

148204
</TabItem>
@@ -410,7 +466,6 @@ From v0.9.0, besides replicas, KubeBlocks also supports scaling in and out insta
410466
componentSpecs:
411467
- name: mdit
412468
componentDef: elasticsearch
413-
serviceAccountName: null
414469
disableExporter: true
415470
replicas: 1
416471
resources: # Change the values of resources

0 commit comments

Comments
 (0)