sync configure-persistent-volume-storage static-pod

Update static-pod.md
pull/44648/head
xin gu 2024-01-06 09:18:28 +08:00
parent f5e1703cf5
commit 27cfd83294
2 changed files with 22 additions and 15 deletions

View File

@ -178,6 +178,16 @@ PersistentVolumeClaim requests to this PersistentVolume.
[StorageClass 的名称](/zh-cn/docs/concepts/storage/persistent-volumes/#class)为 `manual` [StorageClass 的名称](/zh-cn/docs/concepts/storage/persistent-volumes/#class)为 `manual`
它将用于将 PersistentVolumeClaim 的请求绑定到此 PersistentVolume。 它将用于将 PersistentVolumeClaim 的请求绑定到此 PersistentVolume。
{{< note >}}
<!--
This example uses the `ReadWriteOnce` access mode, for simplicity. For
production use, the Kubernetes project recommends using the `ReadWriteOncePod`
access mode instead.
-->
为了简化,本示例采用了 `ReadWriteOnce` 访问模式。然而对于生产环境,
Kubernetes 项目建议改用 `ReadWriteOncePod` 访问模式。
{{< /note >}}
<!-- <!--
Create the PersistentVolume: Create the PersistentVolume:
--> -->

View File

@ -161,24 +161,21 @@ For example, this is how to start a simple web server as a static Pod:
``` ```
<!-- <!--
1. Configure your kubelet on the node to use this directory by running it with 1. Configure the kubelet on that node to set a `staticPodPath` value in the
[kubelet configuration file](/docs/reference/config-api/kubelet-config.v1beta1/).
See [Set Kubelet Parameters Via A Configuration File](/docs/tasks/administer-cluster/kubelet-config-file/)
for more information.
An alternative and deprecated method is to configure the kubelet on that node
to look for static Pod manifests locally, using a command line argument.
To use the deprecated approach, start the kubelet with the
`--pod-manifest-path=/etc/kubernetes/manifests/` argument. `--pod-manifest-path=/etc/kubernetes/manifests/` argument.
On Fedora, edit `/etc/kubernetes/kubelet` to include this line:
--> -->
3. 配置这个节点上的 kubelet使用这个参数执行 `--pod-manifest-path=/etc/kubernetes/manifests/` 3. 在该节点上配置 kubelet在 [kubelet 配置文件](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/)中设定 `staticPodPath` 值。
在 Fedora 上编辑 `/etc/kubernetes/kubelet` 以包含下面这行: 欲了解更多信息,请参考[通过配置文件设定 kubelet 参数](/zh-cn/docs/tasks/administer-cluster/kubelet-config-file/)。
```
KUBELET_ARGS="--cluster-dns=10.254.0.10 --cluster-domain=kube.local --pod-manifest-path=/etc/kubernetes/manifests/"
```
<!--
or add the `staticPodPath: <the directory>` field in the
[kubelet configuration file](/docs/reference/config-api/kubelet-config.v1beta1/).
-->
或者在 [Kubelet 配置文件](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/)中添加
`staticPodPath: <目录>`字段。
另一个已弃用的方法是,在该节点上通过命令行参数配置 kubelet以便从本地查找静态 Pod 清单。
若使用这种弃用的方法,请启动 kubelet 时加上 `--pod-manifest-path=/etc/kubernetes/manifests/` 参数。
<!-- <!--
1. Restart the kubelet. On Fedora, you would run: 1. Restart the kubelet. On Fedora, you would run: