@@ -16,7 +16,7 @@ This page shows how to manually rotate the certificate authority (CA) certificat
16
16
17
17
## {{% heading "prerequisites" %}}
18
18
19
- {{< include "task-tutorial-prereqs.md" >}} {{< version-check >}}
19
+ {{< include "task-tutorial-prereqs.md" >}}
20
20
21
21
<!--
22
22
- For more information about authentication in Kubernetes, see
@@ -55,22 +55,22 @@ Configurations with a single API server will experience unavailability while the
55
55
{{< /caution >}}
56
56
57
57
<!--
58
- 1. Distribute the new CA certificates and private keys
59
- (for example: `ca.crt`, `ca.key`, `front-proxy-ca.crt`, and `front-proxy-ca.key`)
60
- to all your control plane nodes in the Kubernetes certificates directory.
58
+ 1. Distribute the new CA certificates and private keys (for example: `ca.crt`, `ca.key`, `front-proxy-ca.crt`,
59
+ and `front-proxy-ca.key`) to all your control plane nodes in the Kubernetes certificates directory.
61
60
-->
62
61
1 . 将新的 CA 证书和私钥(例如:` ca.crt ` 、` ca.key ` 、` front-proxy-ca.crt ` 和
63
62
` front-proxy-client.key ` )分发到所有控制面节点,放在其 Kubernetes 证书目录下。
64
63
65
64
<!--
66
65
1. Update the `--root-ca-file` flag for the {{< glossary_tooltip term_id="kube-controller-manager" >}} to include
67
- both old and new CA. Then restart the component .
66
+ both old and new CA, then restart the kube-controller-manager .
68
67
69
68
Any {{< glossary_tooltip text="ServiceAccount" term_id="service-account" >}} created after this point will get
70
69
Secrets that include both old and new CAs.
71
70
-->
72
71
2 . 更新 {{< glossary_tooltip text="kube-controller-manager" term_id="kube-controller-manager" >}}
73
- 的 ` --root-ca-file ` 标志,使之同时包含老的和新的 CA,之后重启组件。
72
+ 的 ` --root-ca-file ` 标志,使之同时包含老的和新的 CA,之后重启
73
+ kube-controller-manager。
74
74
75
75
自此刻起,所创建的所有{{< glossary_tooltip text="ServiceAccount" term_id="service-account" >}}
76
76
都会获得同时包含老的 CA 和新的 CA 的 Secret。
@@ -79,9 +79,9 @@ Configurations with a single API server will experience unavailability while the
79
79
<!--
80
80
The files specified by the kube-controller-manager flags `--client-ca-file` and `--cluster-signing-cert-file`
81
81
cannot be CA bundles. If these flags and `--root-ca-file` point to the same `ca.crt` file which is now a
82
- bundle (includes both old and new CA) you will face an error. To workaround this problem you can copy the new CA to a separate
83
- file and make the flags `--client-ca-file` and `--cluster-signing-cert-file` point to the copy. Once `ca.crt` is no longer
84
- a bundle you can restore the problem flags to point to `ca.crt` and delete the copy.
82
+ bundle (includes both old and new CA) you will face an error. To workaround this problem you can copy the new CA
83
+ to a separate file and make the flags `--client-ca-file` and `--cluster-signing-cert-file` point to the copy.
84
+ Once `ca.crt` is no longer a bundle you can restore the problem flags to point to `ca.crt` and delete the copy.
85
85
-->
86
86
kube-controller-manager 标志 ` --client-ca-file ` 和 ` --cluster-signing-cert-file `
87
87
所引用的文件不能是 CA 证书包。如果这些标志和 ` --root-ca-file ` 指向同一个 ` ca.crt ` 包文件
@@ -99,7 +99,7 @@ Configurations with a single API server will experience unavailability while the
99
99
{{< /note >}}
100
100
101
101
<!--
102
- 1. Wait for the controller manager to update ca.crt in the service account Secrets to include both old and new CA certificates.
102
+ 1. Wait for the controller manager to update ` ca.crt` in the service account Secrets to include both old and new CA certificates.
103
103
104
104
If any Pods are started before new CA is used by API servers, the new Pods get this update and will trust both old and new CAs.
105
105
-->
@@ -114,10 +114,10 @@ If any Pods are started before new CA is used by API servers, the new Pods get t
114
114
115
115
* Make sure CoreDNS, kube-proxy and other Pods using in-cluster configurations are working as expected.
116
116
117
- 1. Append the both old and new CA to the file against `-client-ca-file` and `-kubelet-certificate-authority`
117
+ 1. Append the both old and new CA to the file against `-- client-ca-file` and `- -kubelet-certificate-authority`
118
118
flag in the `kube-apiserver` configuration.
119
119
120
- 1. Append the both old and new CA to the file against `-client-ca-file` flag in the `kube-scheduler` configuration.
120
+ 1. Append the both old and new CA to the file against `-- client-ca-file` flag in the `kube-scheduler` configuration.
121
121
-->
122
122
4 . 重启所有使用集群内配置的 Pod(例如:kube-proxy、CoreDNS 等),以便这些 Pod
123
123
能够使用与 ServiceAccount 相关联的 Secret 中的、已更新的证书机构数据。
@@ -161,28 +161,28 @@ If any Pods are started before new CA is used by API servers, the new Pods get t
161
161
{{< /note >}}
162
162
163
163
<!--
164
- 1. Follow below steps in a rolling fashion.
164
+ 1. Follow the steps below in a rolling fashion.
165
165
166
166
1. Restart any other
167
167
[aggregated API servers](/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/) or
168
168
webhook handlers to trust the new CA certificates.
169
169
170
170
1. Restart the kubelet by update the file against `clientCAFile` in kubelet configuration and
171
- `certificate-authority-data` in kubelet.conf to use both the old and new CA on all nodes.
171
+ `certificate-authority-data` in ` kubelet.conf` to use both the old and new CA on all nodes.
172
172
173
- If your kubelet is not using client certificate rotation update `client-certificate-data` and
174
- `client-key-data` in kubelet.conf on all nodes along with the kubelet client certificate file
173
+ If your kubelet is not using client certificate rotation, update `client-certificate-data` and
174
+ `client-key-data` in ` kubelet.conf` on all nodes along with the kubelet client certificate file
175
175
usually found in `/var/lib/kubelet/pki`.
176
176
-->
177
177
9 . 遵循下列步骤执行滚动更新
178
178
179
179
1 . 重新启动所有其他[ 被聚合的 API 服务器] ( /zh-cn/docs/concepts/extend-kubernetes/api-extension/apiserver-aggregation/ )
180
180
或者 Webhook 处理程序,使之信任新的 CA 证书。
181
181
182
- 1 . 在所有节点上更新 kubelet 配置中的 ` clientCAFile ` 所指文件以及 kubelet.conf 中的
182
+ 2 . 在所有节点上更新 kubelet 配置中的 ` clientCAFile ` 所指文件以及 ` kubelet.conf ` 中的
183
183
` certificate-authority-data ` 并重启 kubelet 以同时使用老的和新的 CA 证书。
184
184
185
- 如果你的 kubelet 并未使用客户端证书轮换,则在所有节点上更新 kubelet.conf 中
185
+ 如果你的 kubelet 并未使用客户端证书轮换,则在所有节点上更新 ` kubelet.conf ` 中
186
186
` client-certificate-data ` 和 ` client-key-data ` 以及 kubelet
187
187
客户端证书文件(通常位于 ` /var/lib/kubelet/pki ` 目录下)
188
188
@@ -274,7 +274,7 @@ If any Pods are started before new CA is used by API servers, the new Pods get t
274
274
1. Verify the cluster functionality.
275
275
276
276
1. Check the logs from control plane components, along with the kubelet and the kube-proxy.
277
- Ensure those components are not reporting any TLS errors, see
277
+ Ensure those components are not reporting any TLS errors; see
278
278
[looking at the logs](/docs/tasks/debug/debug-cluster/# looking-at-logs) for more details.
279
279
280
280
1. Validate logs from any aggregated api servers and pods using in-cluster config.
@@ -291,7 +291,7 @@ If any Pods are started before new CA is used by API servers, the new Pods get t
291
291
292
292
1. Update all service account tokens to include new CA certificate only.
293
293
294
- * All pods using an in-cluster kubeconfig will eventually need to be restarted to pick up the new secret ,
294
+ * All pods using an in-cluster kubeconfig will eventually need to be restarted to pick up the new Secret ,
295
295
so that no Pods are relying on the old cluster CA.
296
296
297
297
1. Restart the control plane components by removing the old CA from the kubeconfig files and the files against ` --client-ca-file` , ` --root-ca-file` flags resp.
0 commit comments