Skip to content

Commit c8ef770

Browse files
lenkisvasiliy-t
authored andcommitted
README update: bugs, notes, screenshot (#9)
* Update UI screenshot + add output examples * Remove kubectl scale info + add notes re k8s bugs
1 parent ff2bf71 commit c8ef770

File tree

3 files changed

+89
-9
lines changed

3 files changed

+89
-9
lines changed

README.md

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@ Tarantool Operator is up and running.
163163

164164
![Web UI](./assets/kv_web_ui.png)
165165

166+
> **_NOTE:_** Due to a recent
167+
> [bug in Ingress](https://github.com/kubernetes/minikube/issues/2840),
168+
> web UI may be inaccessible. If needed, you can try this
169+
> [workaround](https://github.com/kubernetes/minikube/issues/2840#issuecomment-492454708).
170+
166171
1. Access the key-value API:
167172

168173
1. Store some value:
@@ -171,20 +176,42 @@ Tarantool Operator is up and running.
171176
curl -XPOST http://MINIKUBE_IP/kv -d '{"key":"key_1", "value": "value_1"}'
172177
```
173178

179+
In case of success you will see this output:
180+
181+
```shell
182+
{"info":"Successfully created"}
183+
```
184+
174185
1. Access stored values:
175186

176187
```shell
177188
curl http://MINIKUBE_IP/kv_dump
178189
```
179190

191+
In case of success you will see this output:
192+
193+
```shell
194+
{"store":[{"key":"key_1","value":"value_1"}]}
195+
```
196+
180197
### Scaling the application
181198

182199
1. Increase the number of replica sets in Storages Role:
183200

184201
```shell
185-
kubectl scale roles.tarantool.io storage --replicas=3
202+
kubectl edit roles.tarantool.io storage
186203
```
187204

205+
This will open the resource in a text editor.
206+
Change `spec.replicas` field value to 3:
207+
208+
```shell
209+
spec:
210+
replicas: 3
211+
```
212+
213+
Save your changes and exit the editor.
214+
188215
This will add new replica sets to the existing cluster.
189216

190217
View the new cluster topology via the cluster web UI.
@@ -195,13 +222,26 @@ Tarantool Operator is up and running.
195222
kubectl edit replicasettemplates.tarantool.io storage-template
196223
```
197224

198-
This will open a text editor. Change `spec.replicas` field value to 3,
199-
then save and exit the editor.
225+
This will open the resource in a text editor.
226+
Change `spec.replicas` field value to 3:
227+
228+
```shell
229+
spec:
230+
replicas: 3
231+
```
232+
233+
Save your changes and exit the editor.
200234

201235
This will add one more replica to each Storages Role replica set.
202236

203237
View the new cluster topology via the cluster web UI.
204238

239+
> **_NOTE:_** When `kubectl` 1.16 is out, you will be able to scale the
240+
> application with a single `kubectl scale` command, for example
241+
> `kubectl scale roles.tarantool.io storage --replicas=3`.
242+
> With younger versions of `kubectl` this is impossible due to
243+
> [this bug](https://github.com/kubernetes/kubernetes/issues/80515).
244+
205245
### Running tests
206246

207247
```shell

README_RUS.md

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -129,20 +129,19 @@ Kubernetes-оператор реализует API версии `tarantool.io/v1
129129
kubectl create -f examples/kv/deployment.yaml
130130
```
131131

132-
Дождитесь, пока все Pod-ы кластера перейдут в статус Running:
132+
Дождитесь, пока все Pod-ы кластера перейдут в статус `Running`:
133133

134134
```shell
135135
kubectl get pods --watch
136136
```
137137

138-
139-
1. Удостоверьтесь, что Cluster готов к работе:
138+
1. Удостоверьтесь, что кластер готов к работе:
140139

141140
```shell
142141
kubectl describe clusters.tarantool.io examples-kv-cluster
143142
```
144143

145-
ожидаем, когда поле Status.State примет значение Ready:
144+
Дождитесь, пока поле `Status.State` примет значение `Ready`:
146145

147146
```shell
148147
...
@@ -164,6 +163,12 @@ Kubernetes-оператор реализует API версии `tarantool.io/v1
164163

165164
![Web UI](./assets/kv_web_ui.png)
166165

166+
> **_ПРИМЕЧАНИЕ:_** В силу недавно появившегося
167+
> [дефекта в Ingress](https://github.com/kubernetes/minikube/issues/2840)
168+
> веб-интерфейс может быть недоступен. Для обхода дефекта вы можете
169+
> воспользоваться этим
170+
> [рецептом](https://github.com/kubernetes/minikube/issues/2840#issuecomment-492454708).
171+
167172
1. Выполните API-запросы к хранилищу:
168173

169174
1. Запишите в базу тестовые данные:
@@ -172,20 +177,42 @@ Kubernetes-оператор реализует API версии `tarantool.io/v1
172177
curl -XPOST http://MINIKUBE_IP/kv -d '{"key":"key_1", "value": "value_1"}'
173178
```
174179

180+
В случае успеха вывод в консоли будет выглядеть так:
181+
182+
```shell
183+
{"info":"Successfully created"}
184+
```
185+
175186
1. Запросите данные из базы:
176187

177188
```shell
178189
curl http://MINIKUBE_IP/kv_dump
179190
```
180191

192+
В случае успеха вывод в консоли будет выглядеть так:
193+
194+
```shell
195+
{"store":[{"key":"key_1","value":"value_1"}]}
196+
```
197+
181198
### Масштабирование приложения
182199

183200
1. Увеличьте количество репликасетов-хранилищ:
184201

185202
```shell
186-
kubectl scale roles.tarantool.io storage --replicas=3
203+
kubectl edit roles.tarantool.io storage
187204
```
188205

206+
В открывшемся текстовом редакторе поменяйте значение поля `spec.replicas`
207+
на 3:
208+
209+
```shell
210+
spec:
211+
replicas: 3
212+
```
213+
214+
Сохраните изменения и закройте редактор.
215+
189216
В результате к существующему кластеру добавятся новые репликасеты.
190217

191218
Проверьте в веб-интерфейсе, что топология изменилась.
@@ -197,12 +224,25 @@ Kubernetes-оператор реализует API версии `tarantool.io/v1
197224
```
198225

199226
В открывшемся текстовом редакторе поменяйте значение поля `spec.replicas`
200-
на 3, сохраните изменения и закройте редактор.
227+
на 3:
228+
229+
```shell
230+
spec:
231+
replicas: 3
232+
```
233+
234+
Сохраните изменения и закройте редактор.
201235

202236
В результате к каждому репликасету-хранилищу добавятся новые реплики.
203237

204238
Проверьте в веб-интерфейсе, что топология изменилась.
205239

240+
> **_ПРИМЕЧАНИЕ:_** С выходом `kubectl` 1.16 вы также сможете масштабировать
241+
> приложение с помощью команды `kubectl scale`, например
242+
> `kubectl scale roles.tarantool.io storage --replicas=3`.
243+
> На более ранних версиях `kubectl` данная возможность не поддерживается в силу
244+
> [этого дефекта](https://github.com/kubernetes/kubernetes/issues/80515).
245+
206246
### Запуск тестов
207247

208248
```shell

assets/kv_web_ui.png

61.3 KB
Loading

0 commit comments

Comments
 (0)