From 4de73db709afdb819ce13f13a5cbf88b64042985 Mon Sep 17 00:00:00 2001 From: windsonsea Date: Mon, 27 Jun 2022 09:12:42 +0800 Subject: [PATCH] [zh-cn] policy/example-psp.yaml --- content/zh-cn/examples/policy/example-psp.yaml | 4 ++-- content/zh-cn/examples/service/nginx-service.yaml | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/content/zh-cn/examples/policy/example-psp.yaml b/content/zh-cn/examples/policy/example-psp.yaml index 7531949b65..b994c2a251 100644 --- a/content/zh-cn/examples/policy/example-psp.yaml +++ b/content/zh-cn/examples/policy/example-psp.yaml @@ -3,8 +3,8 @@ kind: PodSecurityPolicy metadata: name: example spec: - privileged: false # Don't allow privileged pods! - # The rest fills in some required fields. + privileged: false # 不允许提权的 Pod! + # 以下内容负责填充一些必需字段。 seLinux: rule: RunAsAny supplementalGroups: diff --git a/content/zh-cn/examples/service/nginx-service.yaml b/content/zh-cn/examples/service/nginx-service.yaml index 810f0ec7d8..e158e0e4b7 100644 --- a/content/zh-cn/examples/service/nginx-service.yaml +++ b/content/zh-cn/examples/service/nginx-service.yaml @@ -4,13 +4,12 @@ metadata: name: nginx-service spec: ports: - - port: 8000 # the port that this service should serve on - # the container on each pod to connect to, can be a name - # (e.g. 'www') or a number (e.g. 80) + - port: 8000 # 在每个 Pod 的容器上要使用的端口; + # 服务将在此端口上运行,接受连接。 + # 端口可以是一个名称(例如:“www”)或一个数字(例如:80) targetPort: 80 protocol: TCP - # just like the selector in the deployment, - # but this time it identifies the set of pods to load balance - # traffic to. + # 就像 Deployment 中的选择算符, + # 但这里用于识别要对流量进行负载均衡的 Pod 集合。 selector: app: nginx