From 462ac58ffbf13e25f8196e81aae16525fd4e0034 Mon Sep 17 00:00:00 2001 From: flydragon <1045438139@qq.com> Date: Mon, 1 Oct 2018 21:41:01 +0800 Subject: [PATCH] =?UTF-8?q?zh=EF=BC=9A=20content/docs/tasks/security/plugi?= =?UTF-8?q?n-ca-cert/=20(#2657)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../docs/tasks/security/plugin-ca-cert/index.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/content_zh/docs/tasks/security/plugin-ca-cert/index.md b/content_zh/docs/tasks/security/plugin-ca-cert/index.md index 09822a024c..b38d25e99e 100644 --- a/content_zh/docs/tasks/security/plugin-ca-cert/index.md +++ b/content_zh/docs/tasks/security/plugin-ca-cert/index.md @@ -41,10 +41,12 @@ keywords: [安全,证书] --from-file=samples/certs/cert-chain.pem {{< /text >}} -1. 重新部署 Citadel,它会从加载的 secret 中读取证书和密钥。 +1. 使用 Helm 重新部署 Citadel,其中 `global.mtls.enabled` 设置为 `true`,`security.selfSigned` 设置为 `false` 。Citadel 将从 secret-mount 文件中读取证书和密钥。 {{< text bash >}} - $ kubectl apply -f install/kubernetes/istio-citadel-plugin-certs.yaml + $ helm template install/kubernetes/helm/istio --name istio --namespace istio-system -x charts/security/templates/deployment.yaml \ + --set global.mtls.enabled=true --set security.selfSigned=false > $HOME/citadel-plugin-cert.yaml + $ kubectl apply -f $HOME/citadel-plugin-cert.yaml {{< /text >}} > 注意:如果使用不同的证书/密钥文件,或者不同的 secret 名称,需要根据实际情况变更 `istio-citadel-plugin-certs.yaml` @@ -62,7 +64,6 @@ keywords: [安全,证书] 1. 根据[部署文档](/zh/docs/examples/bookinfo/)安装 Bookinfo 应用。 1. 获取已加载的证书。 - 下面我们使用 ratings pod 作为例子,检查这个 Pod 上加载的证书。 用变量 `RATINGSPOD` 保存 Pod 名称: @@ -77,7 +78,7 @@ keywords: [安全,证书] $ kubectl exec -it $RATINGSPOD -c istio-proxy -- /bin/cat /etc/certs/root-cert.pem > /tmp/pod-root-cert.pem {{< /text >}} - `/tmp/pod-root-cert.pem` 文件中包含落地到 Pod 中的根证书。 + `/tmp/pod-root-cert.pem` 文件中包含传播到 Pod 中的根证书。 {{< text bash >}} $ kubectl exec -it $RATINGSPOD -c istio-proxy -- /bin/cat /etc/certs/cert-chain.pem > /tmp/pod-cert-chain.pem @@ -85,7 +86,7 @@ keywords: [安全,证书] 而 `/tmp/pod-cert-chain.pem` 这个文件则包含了工作负载证书以及传播到 Pod 中的 CA 证书 -1. 检查根证书和运维人员指定的证书是否一致: +1. 检查根证书和运维人员指定的证书是否一致: {{< text bash >}} $ openssl x509 -in @samples/certs/root-cert.pem@ -text -noout > /tmp/root-cert.crt.txt