Skip to content

Commit e7eb189

Browse files
authored
Merge pull request #410 from runkecheng/quick_build_image_and_apply
docs: Add tutorial of building images. #409
2 parents 2e89d69 + 5ebdad2 commit e7eb189

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
## How to build images and apply
2+
3+
### Operator
4+
5+
1. Build operator image and push to your dockerhub.
6+
7+
```
8+
docker build -t {your repo}/mysql-operator:{your tag} . && docker push {your repo}/mysql-operator:{your tag}
9+
```
10+
11+
2. Add radondb mysql helm repo.
12+
13+
```
14+
helm repo add radondb https://radondb.github.io/radondb-mysql-kubernetes/
15+
```
16+
17+
3. Install/Update operator using your image.
18+
19+
```
20+
helm upgrade demo radondb/mysql-operator --install --set manager.image={your repo}/mysql-operator --set manager.tag={your tag}
21+
```
22+
23+
### Sidecar
24+
25+
1. Build sidecar image and push to your dockerhub.
26+
27+
```
28+
docker build -f Dockerfile.sidecar -t {your repo}/mysql-sidecar:{your tag} . && docker push {your repo}/mysql-sidecar:{your tag}
29+
```
30+
31+
2. Create a sample cluster if not exist.
32+
33+
```
34+
kubectl apply -f https://github.com/radondb/radondb-mysql-kubernetes/releases/latest/download/mysql_v1alpha1_mysqlcluster.yaml
35+
```
36+
37+
3. Apply image to existing cluster.
38+
39+
```
40+
kubectl patch mysql sample -p '{"spec": {"podPolicy": {"sidecarImage": "{your repo}/mysql-sidecar:{your tag}"}}}' --type=merge
41+
```
42+
43+
> This example is for cluster named `sample`, you can modify as your cluster.
44+

0 commit comments

Comments
 (0)