@@ -98,25 +98,25 @@ Configurations with a single API server will experience unavailability while the
9898 也会获得此更新并且同时信任老的和新的 CA 证书。
9999 <!--
100100 ```shell
101- base64_encoded_ca="$(base64 <path to file containing both old and new CAs>)"
101+ base64_encoded_ca="$(base64 -w0 <path to file containing both old and new CAs>)"
102102
103103 for namespace in $(kubectl get ns --no-headers | awk '{print $1}'); do
104104 for token in $(kubectl get secrets --namespace "$namespace" --field-selector type=kubernetes.io/service-account-token -o name); do
105105 kubectl get $token --namespace "$namespace" -o yaml | \
106- /bin/sed "s/\(ca.crt:\).*/\1 ${base64_encoded_ca}" | \
106+ /bin/sed "s/\(ca.crt:\).*/\1 ${base64_encoded_ca}/ " | \
107107 kubectl apply -f -
108108 done
109109 done
110110 ```
111111 -->
112112
113113 ``` shell
114- base64_encoded_ca=" $( base64 < path to file containing both old and new CAs> ) "
114+ base64_encoded_ca=" $( base64 -w0 < path to file containing both old and new CAs> ) "
115115
116116 for namespace in $( kubectl get ns --no-headers | awk ' {print $1}' ) ; do
117117 for token in $( kubectl get secrets --namespace " $namespace " --field-selector type=kubernetes.io/service-account-token -o name) ; do
118118 kubectl get $token --namespace " $namespace " -o yaml | \
119- /bin/sed " s/\(ca.crt:\).*/\1 ${base64_encoded_ca} " | \
119+ /bin/sed " s/\(ca.crt:\).*/\1 ${base64_encoded_ca} / " | \
120120 kubectl apply -f -
121121 done
122122 done
@@ -205,13 +205,13 @@ Configurations with a single API server will experience unavailability while the
205205
206206 <!--
207207 To generate certificates and private keys for your cluster using the `openssl`
208- command line tool, see [Certificates (`openssl`)](/docs/concepts/cluster-administration /certificates/#openssl).
209- You can also use [`cfssl`](/docs/concepts/cluster-administration /certificates/#cfssl).
208+ command line tool, see [Certificates (`openssl`)](/docs/tasks/administer-cluster /certificates/#openssl).
209+ You can also use [`cfssl`](/docs/tasks/administer-cluster /certificates/#cfssl).
210210 -->
211211 {{< note >}}
212212 要使用 ` openssl ` 命令行为集群生成新的证书和私钥,可参阅
213- [ 证书(` openssl ` )] ( /zh/docs/concepts/cluster-administration /certificates/#openssl ) 。
214- 你也可以使用[ ` cfssl ` ] ( /zh/docs/concepts/cluster-administration /certificates/#cfssl ) .
213+ [ 证书(` openssl ` )] ( /zh/docs/tasks/administer-cluster /certificates/#openssl ) 。
214+ 你也可以使用[ ` cfssl ` ] ( /zh/docs/tasks/administer-cluster /certificates/#cfssl ) .
215215 {{< /note >}}
216216
217217 <!--
@@ -249,10 +249,10 @@ Configurations with a single API server will experience unavailability while the
249249 ConfigMap ` cluster-info` ,使之包含新的 CA 证书。
250250
251251 ` ` ` shell
252- base64_encoded_ca=" $( base64 /etc/kubernetes/pki/ca.crt) "
252+ base64_encoded_ca=" $( base64 -w0 /etc/kubernetes/pki/ca.crt) "
253253
254254 kubectl get cm/cluster-info --namespace kube-public -o yaml | \
255- /bin/sed " s/\(certificate-authority-data:\).*/\1 ${base64_encoded_ca} " | \
255+ /bin/sed " s/\(certificate-authority-data:\).*/\1 ${base64_encoded_ca} / " | \
256256 kubectl apply -f -
257257 ` ` `
258258< ! --
0 commit comments