You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This operator is developed with [kubebuilder](https://github.com/kubernetes-sigs/kubebuilder), which can deploy StarRocks CRD resources in kubernetes.
7
6
8
-
This Kubernetes Operator is able to deploy StarRocks' Front End (FE), Back End (BE) and Compute Node (CN) components into your kubernetes environment. These components run in FQDN (fully qualified domain name) mode by default.
7
+
Using [kubebuilder](https://github.com/kubernetes-sigs/kubebuilder), a framework that enables the deployment of
8
+
StarRocks Custom Resource Definition (CRD) resources within a Kubernetes environment.
9
+
10
+
The Kubernetes Operator provided by StarRocks facilitates the deployment of StarRocks' Front End (FE), Back End (BE),
11
+
and Compute Node (CN) components within your Kubernetes environment. By default, these components operate in FQDN (fully
12
+
qualified domain name) mode.
9
13
10
14
## Requirements
11
-
* kubernetes 1.18+
12
-
* golang 1.18+
15
+
16
+
* kubernetes 1.18+
17
+
* golang 1.18+
13
18
14
19
## Supported Features
20
+
15
21
* FE decouples with CN and BE. FE is a must-have component, BE and CN can be optionally deployed.
16
22
* Support v2 horizontalpodautoscalers for CN cluster.
17
23
18
24
## (Optional) Build the operator images by yourself
25
+
19
26
Get the official operator image from [here](https://hub.docker.com/r/starrocks/centos-operator/tags).
20
27
21
28
### Build starrocks operator docker image
29
+
22
30
Follow below instructions if you want to build your own image.
Apply the Operator manifest. By default, the Operator is configured to install in the starrocks namespace.
48
-
To use the Operator in a custom namespace, download the [Operator manifest](https://raw.githubusercontent.com/StarRocks/starrocks-kubernetes-operator/main/deploy/operator.yaml) and edit all instances of namespace: starrocks to specify your custom namespace.
49
-
Then apply this version of the manifest to the cluster with kubectl apply -f {local-file-path} instead of using the command below.
50
-
```shell
62
+
63
+
Apply the Operator manifest. By default, the Operator is configured to install in the starrocks namespace.
64
+
To use the Operator in a custom namespace, download
65
+
the [Operator manifest](https://raw.githubusercontent.com/StarRocks/starrocks-kubernetes-operator/main/deploy/operator.yaml)
66
+
and edit all instances of namespace: starrocks to specify your custom namespace.
67
+
Then apply this version of the manifest to the cluster with kubectl apply -f {local-file-path} instead of using the
You need to prepare a separate yaml file to deploy the StarRocks FE, BE and CN components.
56
77
The starrocks cluster CRD fields explains in [api.md](./doc/api.md).
57
78
The [examples](./examples/starrocks) directory contains some simple example for reference.
58
79
59
-
You can use any of the template yaml file as a starting point. You can further add more configurations into the template yaml file following this deployment documentation.
80
+
You can use any of the template yaml file as a starting point. You can further add more configurations into the template
81
+
yaml file following this deployment documentation.
60
82
61
83
### Configure the StarRocks' components images
84
+
62
85
Official FE/CN/BE components images can be found from [dockerhub](https://hub.docker.com/u/starrocks):
63
86
64
87
You can specify the image name in the yaml file.
65
88
For example, the below configuration uses the `starrocks/fe-ubuntu:2.5.4` image for FE.
89
+
66
90
```yaml
67
91
starRocksFeSpec:
68
92
image: starrocks/fe-ubuntu:2.5.4
69
93
```
70
94
71
95
### (Optional) Using ConfigMap to configure your StarRocks cluster
72
96
73
-
The official images contains default application configuration file, however, they can be overritten by configuring kubernetes configmap deployment crd.
97
+
The official images contains default application configuration file, however, they can be overritten by configuring
98
+
kubernetes configmap deployment crd.
74
99
75
100
You can generate the configmap from an StarRocks configuration file.
76
-
Below is an example of creating a Kubernetes configmap `fe-config-map` from the `fe.conf` configuration file. You can do the same with BE and CN.
77
-
```shell
101
+
Below is an example of creating a Kubernetes configmap `fe-config-map` from the `fe.conf` configuration file. You can do
102
+
the same with BE and CN.
103
+
104
+
```console
78
105
# create fe-config-map from starrocks/fe/conf/fe.conf file
Once the configmap is created, you can reference the configmap in the yaml file.
82
110
For example:
111
+
83
112
```yaml
84
113
# fe use configmap example
85
114
starRocksFeSpec:
@@ -91,64 +120,82 @@ starRocksCnSpec:
91
120
configMapInfo:
92
121
configMapName: cn-config-map
93
122
resolveKey: cn.conf
94
-
# be use configmap example
123
+
# be use configmap example
95
124
starRocksBeSpec:
96
125
configMapInfo:
97
126
configMapName: be-config-map
98
127
resolveKey: be.conf
99
128
```
129
+
100
130
### (Optional) Configuring storage volume
101
-
External storage can be used to store FE meta and BE data for persistence. `storageVolumes` can be specified in corresponding component spec to enable external storage volumes auto provisioning. Note that the specific `storageClassName` should be available in kubernetes cluster before enabling this storageVolume feature.
102
131
103
-
If `StorageVolume` info is not specified in CRD spec, the operator will use emptydir mode to store FE meta and BE data.
132
+
External storage can be used to store FE meta and BE data for persistence. `storageVolumes` can be specified in
133
+
corresponding component spec to enable external storage volumes auto provisioning. Note that the
134
+
specific `storageClassName` should be available in kubernetes cluster before enabling this storageVolume feature.
135
+
136
+
If `StorageVolume` info is not specified in CRD spec, the operator will use emptydir mode to store FE meta and BE data.
104
137
105
138
**FE storage example**
139
+
106
140
```yaml
107
141
starRocksFeSpec:
108
142
storageVolumes:
109
-
- name: fe-meta
110
-
storageClassName: meta-storage
111
-
storageSize: 10Gi
112
-
mountPath: /opt/starrocks/fe/meta # overwrite the default meta path
143
+
- name: fe-meta
144
+
storageClassName: meta-storage
145
+
storageSize: 10Gi
146
+
mountPath: /opt/starrocks/fe/meta # overwrite the default meta path
113
147
```
148
+
114
149
**BE storage example**
150
+
115
151
```yaml
116
152
starRocksBeSpec:
117
153
storageVolumes:
118
-
- name: be-data
119
-
storageClassName: data-storage
120
-
storageSize: 1Ti
121
-
mountPath: /opt/starrocks/be/storage # overwrite the default data path
154
+
- name: be-data
155
+
storageClassName: data-storage
156
+
storageSize: 1Ti
157
+
mountPath: /opt/starrocks/be/storage # overwrite the default data path
122
158
```
123
159
124
160
### Deploy the StarRocks cluster
125
-
For demonstration purpose, we use the [starrocks-fe-and-be.yaml](./examples/starrocks/starrocks-fe-and-be.yaml) example template to start a 3 FE and 3 BE StarRocks cluster.
126
161
127
-
```bash
162
+
For demonstration purpose, we use the [starrocks-fe-and-be.yaml](./examples/starrocks/starrocks-fe-and-be.yaml) example
163
+
template to start a 3 FE and 3 BE StarRocks cluster.
164
+
165
+
```console
128
166
kubectl apply -f starrocks-fe-and-be.yaml
129
167
```
130
168
131
169
### Connect to the deployed StarRocks Cluster
132
170
133
-
After deploying the StarRocks cluster, you can use `kubectl get svc -n <namespace>` to find the IP to connect to. For example if the namespace that starrocks is deployed into is `starrocks`, you can:
134
-
```bash
171
+
After deploying the StarRocks cluster, you can use `kubectl get svc -n <namespace>` to find the IP to connect to. For
172
+
example if the namespace that starrocks is deployed into is `starrocks`, you can:
173
+
174
+
```console
135
175
kubectl get svc -n starrocks
136
176
```
177
+
137
178
`<your-StarRocksCluster-name>-fe-service`'s clusterIP is the IP to use to connect to StarRocks FE.
This functionality is in beta and is subject to change. The code is provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.
You can then run `helm search repo kube-starrocks` to see the charts.
18
17
19
18
## Contributing
20
19
21
-
The source code of all [StarRocks](https://www.starrocks.io/) community [Helm](https://helm.sh) charts can be found on Github: <https://github.com/StarRocks/helm-charts/>
20
+
You can find the source code for all the community Helm charts of StarRocks at the following Github
21
+
repository: https://github.com/StarRocks/starrocks-kubernetes-operator/. StarRocks itself can be explored
22
+
at https://www.starrocks.io/.
22
23
23
24
## License
24
25
25
-
<!-- Keep full URL links to repo files because this README syncs from main to gh-pages. -->
Install the kube-starrocks, a collectionof Kubernetes manifests to provide easy to operate end-to-end Kubernetes cluster deploy starrocks cluster use [starrocks Operator](https://github.com/StarRocks/starrocks-kubernetes-operator).
2
+
3
+
Install the kube-starrocks, a collection of Kubernetes manifests to provide easy to operate end-to-end Kubernetes
4
+
cluster deploy starrocks cluster use [starrocks Operator](https://github.com/StarRocks/starrocks-kubernetes-operator).
See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing). To see all configurable options with detailed comments:
51
+
See [Customizing the Chart Before Installing](https://helm.sh/docs/intro/using_helm/#customizing-the-chart-before-installing).
52
+
To see all configurable options with detailed comments:
47
53
48
54
```console
49
55
helm show values starrocks-community/kube-starrocks
@@ -53,5 +59,5 @@ helm show values starrocks-community/kube-starrocks
53
59
54
60
You can see our documentation at StarRocks website for more in-depth installation and instructions for production:
0 commit comments