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

pd/tls: add upgrade tls description #2612

Merged
merged 9 commits into from
Nov 7, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions zh/enable-tls-between-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,30 @@ aliases: ['/docs-cn/tidb-in-kubernetes/dev/enable-tls-between-components/']
> **注意:**
>
> 在集群创建后,不能修改此字段,否则将导致集群升级失败,此时需要删除已有集群,并重新创建。
>
> 集群创建后再开启 tls,在无法重建的情况下,可尝试以下方式(**请谨慎操作**):
HuSharp marked this conversation as resolved.
Show resolved Hide resolved
>
> 1. 在存在多个 PD 节点的情况下,缩容 PD 至 1 个。(否则可以跳过此步骤)
HuSharp marked this conversation as resolved.
Show resolved Hide resolved
> 2. 下载 etcdctl。参考 [etcdctl 安装指南](https://etcd.io/docs/v3.4/install/),etcdctl 位于文件夹目录下。
HuSharp marked this conversation as resolved.
Show resolved Hide resolved
> 3. 设置 `.spec.tlsCluster.enabled` 属性为 `true`;
HuSharp marked this conversation as resolved.
Show resolved Hide resolved
> 4. 查看 etcd member,可见 peerURLs 此时为 http:
csuzhangxc marked this conversation as resolved.
Show resolved Hide resolved
> >
> > ```bash
> > etcdctl --endpoints https://127.0.0.1:2379 --cert-file ./pd-tls/tls.crt --key-file ./pd-tls/tls.key --ca-file ./pd-tls/ca.crt member list
csuzhangxc marked this conversation as resolved.
Show resolved Hide resolved
> > 输出示例:
> > 8e9e05c52164694d: name=tidb-test-v75-pd-0 peerURLs=http://localhost:2380 clientURLs=https://localhost:2379 isLeader=true
> > ```
> >
> 5. 修改 etcd member 的 peerURLs 为 https:
> >
> > ```bash
> > etcdctl --endpoints https://127.0.0.1:2379 --cert-file ./pd-tls/tls.crt --key-file ./pd-tls/tls.key --ca-file ./pd-tls/ca.crt member update 8e9e05c52164694d --peer-urls="https://localhost:2380"
HuSharp marked this conversation as resolved.
Show resolved Hide resolved
> > 输出示例:
> > Updated member with ID 8e9e05c52164694d in cluster
> > ```
> >
> 6. 查看此时 etcd member 的 peerURLs 已经修改为 https。
HuSharp marked this conversation as resolved.
Show resolved Hide resolved
> 7. 若缩容过 PD 节点,需先扩容至原有数量。(否则可以跳过此步骤)

3. 配置 `pd-ctl`,`tikv-ctl` 连接集群。

Expand Down