Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zh: add Advanced StatefulSet #52

Merged
merged 6 commits into from
Mar 30, 2020
Merged

zh: add Advanced StatefulSet #52

merged 6 commits into from
Mar 30, 2020

Conversation

cofyc
Copy link
Contributor

@cofyc cofyc commented Mar 26, 2020

What is changed, added or deleted? (Required)

fixes #9

Which TiDB Operator version(s) do your changes apply to? (Required)

  • master (the latest development version, including v1.1 changes for now)
  • v1.0 (TiDB Operator 1.0 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

config: {}
```

会部署 4 个 tikv 实例,分别为 basic-tikv-0, basic-tikv-1, ..., basic-tikv-3。若想缩容掉 basic-tikv-1 需要在修改 `spec.tikv.replicas` 为 3 同时配置以下 annotations:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest adding scaling out cases:

  • scaling out one pod that has been deleted before
  • scaling out one pod that has not been deleted before

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May also include PVC operations.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

zh/advanced-statefulset.md Outdated Show resolved Hide resolved
zh/advanced-statefulset.md Outdated Show resolved Hide resolved
zh/advanced-statefulset.md Outdated Show resolved Hide resolved
zh/advanced-statefulset.md Outdated Show resolved Hide resolved
zh/advanced-statefulset.md Outdated Show resolved Hide resolved
zh/advanced-statefulset.md Outdated Show resolved Hide resolved
zh/advanced-statefulset.md Outdated Show resolved Hide resolved
zh/advanced-statefulset.md Outdated Show resolved Hide resolved
@ran-huang ran-huang added translation/welcome Waits for a contributor to translate this PR to docs-tidb-operator/zh or docs-tidb-operator/en. size/medium Changes of a medium size. labels Mar 27, 2020
@lilin90 lilin90 changed the title zh: Advanced StatefulSet zh: add Advanced StatefulSet Mar 27, 2020
@ran-huang ran-huang added the needs-cherry-pick-release-1.1 Should cherry pick this PR to release-1.1 branch. label Mar 29, 2020
@ran-huang
Copy link
Contributor

@cofyc Please resolve the conflicts.

@@ -61,6 +61,7 @@
- [tkctl](use-tkctl.md)
- [TiDB Toolkit](tidb-toolkit.md)
+ 组件
- [TiDB Scheduler 扩展调度器](tidb-scheduler.md)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed indent

zh/advanced-statefulset.md Outdated Show resolved Hide resolved
zh/advanced-statefulset.md Outdated Show resolved Hide resolved
zh/advanced-statefulset.md Outdated Show resolved Hide resolved
zh/advanced-statefulset.md Outdated Show resolved Hide resolved
zh/advanced-statefulset.md Outdated Show resolved Hide resolved
zh/advanced-statefulset.md Outdated Show resolved Hide resolved
Co-Authored-By: Ran <huangran@pingcap.com>
Copy link
Contributor

@ran-huang ran-huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zh/advanced-statefulset.md Outdated Show resolved Hide resolved
zh/advanced-statefulset.md Outdated Show resolved Hide resolved
zh/advanced-statefulset.md Outdated Show resolved Hide resolved
zh/advanced-statefulset.md Outdated Show resolved Hide resolved

其中 Annotation 值为 JSON 的整数数组,比如 `[0]`, `[0,1]`, `[1,3]` 等。

### 操作 TidbCluster 对象在指定位置进行扩容
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add a section for the normal scaling out, which is the same as the k8s sts controller?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's necessary because there is no difference.

@ran-huang ran-huang self-assigned this Mar 30, 2020
@ran-huang ran-huang added translation/doing This PR’s assignee is translating this PR. and removed translation/welcome Waits for a contributor to translate this PR to docs-tidb-operator/zh or docs-tidb-operator/en. labels Mar 30, 2020
Co-Authored-By: DanielZhangQD <36026334+DanielZhangQD@users.noreply.github.com>
Copy link
Contributor

@DanielZhangQD DanielZhangQD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DanielZhangQD DanielZhangQD merged commit 37c9915 into pingcap:master Mar 30, 2020
sre-bot pushed a commit to sre-bot/docs-tidb-operator that referenced this pull request Mar 30, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
@sre-bot sre-bot mentioned this pull request Mar 30, 2020
2 tasks
@sre-bot
Copy link
Contributor

sre-bot commented Mar 30, 2020

cherry pick to release-1.1 in PR #107

sre-bot added a commit that referenced this pull request Mar 30, 2020
Signed-off-by: sre-bot <sre-bot@pingcap.com>
create: true
```

然后升级 TiDB Operator,具体可参考[升级 TiDB Operator 文档](upgrade-TiDB Operator.md)。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deadlink

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in #110


> **注意:**
>
> TiDB Operator 通过开启 `AdvancedStatefulSet` 特性,会将当前 `StatefulSet` 对象转换成 `AdvancedStatefulSet 对象。但是,TiDB Operator 不支持在关闭 `AdvancedStatefulSet` 特性后,自动从 `AdvancedStatefulSet` 转换为 Kubernetes 内置的 `StatefulSet` 对象。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing a `.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in #110


### 通过 kubectl 查看 AdvancedStatefulSet 对象

`AdvancedStatefulSet` 数据格式与 `StatefulSet` 完全一致,但以 CRD 方式实现,别名为 `asts` ,可通过以下方法查看命令空间下的对象。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

命名空间

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in #110

@ran-huang ran-huang added translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR. and removed translation/doing This PR’s assignee is translating this PR. labels Mar 31, 2020
kubectl apply -f https://raw.githubusercontent.com/pingcap/tidb-operator/master/manifests/advanced-statefulset-crd.v1beta1.yaml
```

* Kubernetes 1.16 之后:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.16 及之后版本

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in #110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-cherry-pick-release-1.1 Should cherry pick this PR to release-1.1 branch. size/medium Changes of a medium size. translation/done This PR has been translated from English into Chinese and updated to pingcap/docs-cn in a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add docs about Advanced Statefulset feature
4 participants