Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[zh] sync list-all-running-container-images reserve-compute-resources managing-tls-in-a-cluster #43405

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ of Containers for each.

- Fetch all Pods in all namespaces using `kubectl get pods --all-namespaces`
- Format the output to include only the list of Container image names
using `-o jsonpath={.items[*].spec.containers[*].image}`. This will recursively parse out the
using `-o jsonpath={.items[*].spec['initContainers', 'containers'][*].image}`. This will recursively parse out the
`image` field from the returned json.
- See the [jsonpath reference](/docs/reference/kubectl/jsonpath/)
for further information on how to use jsonpath.
Expand All @@ -48,7 +48,7 @@ of Containers for each.
## 列出所有命名空间下的所有容器镜像 {#list-all-container-images-in-all-namespaces}

- 使用 `kubectl get pods --all-namespaces` 获取所有命名空间下的所有 Pod
- 使用 `-o jsonpath={.items[*].spec.containers[*].image}` 来格式化输出,以仅包含容器镜像名称。
- 使用 `-o jsonpath={.items[*].spec['initContainers', 'containers'][*].image}` 来格式化输出,以仅包含容器镜像名称。
这将以递归方式从返回的 json 中解析出 `image` 字段。
- 参阅 [jsonpath 说明](/zh-cn/docs/reference/kubectl/jsonpath/)
获取更多关于如何使用 jsonpath 的信息。
Expand All @@ -69,14 +69,14 @@ The jsonpath is interpreted as follows:

- `.items[*]`: for each returned value
- `.spec`: get the spec
- `.containers[*]`: for each container
- `['initContainers', 'containers'][*]`: for each container
- `.image`: get the image
-->
jsonpath 解释如下:

- `.items[*]`: 对于每个返回的值
- `.spec`: 获取 spec
- `.containers[*]`: 对于每个容器
- `['initContainers', 'containers'][*]`: 对于每个容器
- `.image`: 获取镜像

<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,13 @@ for more details on recommended control group hierarchy.

<!--
Note that Kubelet **does not** create `--kube-reserved-cgroup` if it doesn't
exist. Kubelet will fail if an invalid cgroup is specified. With `systemd`
exist. The kubelet will fail to start if an invalid cgroup is specified. With `systemd`
cgroup driver, you should follow a specific pattern for the name of the cgroup you
define: the name should be the value you set for `--kube-reserved-cgroup`,
with `.slice` appended.
-->
请注意,如果 `--kube-reserved-cgroup` 不存在,Kubelet 将 **不会** 创建它。
如果指定了一个无效的 cgroup,Kubelet 将会失败。就 `systemd` cgroup 驱动而言,
如果指定了一个无效的 cgroup,Kubelet 将会无法启动。就 `systemd` cgroup 驱动而言,
你要为所定义的 cgroup 设置名称时要遵循特定的模式:
所设置的名字应该是你为 `--kube-reserved-cgroup` 所给的参数值加上 `.slice` 后缀。

Expand Down
10 changes: 5 additions & 5 deletions content/zh-cn/docs/tasks/tls/managing-tls-in-a-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ You need the `cfssl` tool. You can download `cfssl` from

Some steps in this page use the `jq` tool. If you don't have `jq`, you can
install it via your operating system's software sources, or fetch it from
[https://stedolan.github.io/jq/](https://stedolan.github.io/jq/).
[https://jqlang.github.io/jq/](https://jqlang.github.io/jq/).
-->
你需要 `cfssl` 工具。
你可以从 [https://github.com/cloudflare/cfssl/releases](https://github.com/cloudflare/cfssl/releases)
下载 `cfssl`。

本文中某些步骤使用 `jq` 工具。如果你没有 `jq`,你可以通过操作系统的软件源安装,
或者从 [https://stedolan.github.io/jq/](https://stedolan.github.io/jq/) 获取。
或者从 [https://jqlang.github.io/jq/](https://jqlang.github.io/jq/) 获取。

<!-- steps -->

Expand Down Expand Up @@ -346,7 +346,7 @@ This produces a certificate authority key file (`ca-key.pem`) and certificate (`
<!-- ### Issue a certificate -->
### 颁发证书

{{% code file="tls/server-signing-config.json" %}}
{{% code_sample file="tls/server-signing-config.json" %}}

<!--
Use a `server-signing-config.json` signing configuration and the certificate authority key file
Expand Down Expand Up @@ -393,12 +393,12 @@ kubectl get csr my-svc.my-namespace -o json | \

{{< note >}}
<!--
This uses the command line tool [`jq`](https://stedolan.github.io/jq/) to populate the base64-encoded
This uses the command line tool [`jq`](https://jqlang.github.io/jq/) to populate the base64-encoded
content in the `.status.certificate` field.
If you do not have `jq`, you can also save the JSON output to a file, populate this field manually, and
upload the resulting file.
-->
这使用命令行工具 [`jq`](https://stedolan.github.io/jq/)
这使用命令行工具 [`jq`](https://jqlang.github.io/jq/)
在 `.status.certificate` 字段中填充 base64 编码的内容。
如果你没有 `jq` 工具,你还可以将 JSON 输出保存到文件中,手动填充此字段,然后上传结果文件。
{{< /note >}}
Expand Down