From 66206ab1415fc76e03371aa434e3b8537ba41eac Mon Sep 17 00:00:00 2001 From: Arhell Date: Tue, 30 Mar 2021 00:38:49 +0300 Subject: [PATCH] [zh] fix: errors in base64 and sed commands --- .../tls/manual-rotation-of-ca-certificates.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/content/zh/docs/tasks/tls/manual-rotation-of-ca-certificates.md b/content/zh/docs/tasks/tls/manual-rotation-of-ca-certificates.md index ca9601eeb3..87e9b5eb64 100644 --- a/content/zh/docs/tasks/tls/manual-rotation-of-ca-certificates.md +++ b/content/zh/docs/tasks/tls/manual-rotation-of-ca-certificates.md @@ -98,12 +98,12 @@ Configurations with a single API server will experience unavailability while the 也会获得此更新并且同时信任老的和新的 CA 证书。 ```shell - base64_encoded_ca="$(base64 )" + base64_encoded_ca="$(base64 -w0 )" for namespace in $(kubectl get ns --no-headers | awk '{print $1}'); do for token in $(kubectl get secrets --namespace "$namespace" --field-selector type=kubernetes.io/service-account-token -o name); do kubectl get $token --namespace "$namespace" -o yaml | \ - /bin/sed "s/\(ca.crt:\).*/\1 ${base64_encoded_ca}" | \ + /bin/sed "s/\(ca.crt:\).*/\1 ${base64_encoded_ca}/" | \ kubectl apply -f - done done @@ -205,13 +205,13 @@ Configurations with a single API server will experience unavailability while the {{< note >}} 要使用 `openssl` 命令行为集群生成新的证书和私钥,可参阅 - [证书(`openssl`)](/zh/docs/concepts/cluster-administration/certificates/#openssl)。 - 你也可以使用[`cfssl`](/zh/docs/concepts/cluster-administration/certificates/#cfssl). + [证书(`openssl`)](/zh/docs/tasks/administer-cluster/certificates/#openssl)。 + 你也可以使用[`cfssl`](/zh/docs/tasks/administer-cluster/certificates/#cfssl). {{< /note >}}