translation for section admin4
This commit is contained in:
@@ -262,45 +262,131 @@ curl -L https://github.com/kubernetes-sigs/sig-windows-tools/releases/latest/dow
|
||||
|
||||
<!--
|
||||
### Joining a Windows worker node
|
||||
|
||||
You must install the `Containers` feature and install Docker. Instructions
|
||||
to do so are available at [Install Docker Engine - Enterprise on Windows Servers](https://docs.mirantis.com/docker-enterprise/v3.1/dockeree-products/docker-engine-enterprise/dee-windows.html).
|
||||
|
||||
All code snippets in Windows sections are to be run in a PowerShell environment
|
||||
with elevated permissions (Administrator) on the Windows worker node.
|
||||
-->
|
||||
### 加入 Windows 工作节点 {#joining-a-windows-worker-node}
|
||||
|
||||
你必须安装 `Containers` 功能特性并安装 Docker 工具。相关的指令可以在
|
||||
[Install Docker Engine - Enterprise on Windows Servers](https://hub.docker.com/editions/enterprise/docker-ee-server-windows)
|
||||
处找到。
|
||||
|
||||
{{< note >}}
|
||||
<!--
|
||||
All code snippets in Windows sections are to be run in a PowerShell environment
|
||||
with elevated permissions (Administrator) on the Windows worker node.
|
||||
-->
|
||||
Windows 节的所有代码片段都需要在 PowerShell 环境中执行,并且要求在
|
||||
Windows 工作节点上具有提升的权限(Administrator)。
|
||||
{{< /note >}}
|
||||
|
||||
{{< tabs name="tab-windows-kubeadm-runtime-installation" >}}
|
||||
{{% tab name="Docker EE" %}}
|
||||
|
||||
<!--
|
||||
1. Install wins, kubelet, and kubeadm.
|
||||
#### Install Docker EE
|
||||
|
||||
Install the `Containers` feature
|
||||
-->
|
||||
1. 安装 wins、kubelet 和 kubeadm
|
||||
#### 安装 Docker EE
|
||||
|
||||
```powershell
|
||||
Install-WindowsFeature -Name containers
|
||||
```
|
||||
<!--
|
||||
Install Docker
|
||||
Instructions to do so are available at [Install Docker Engine - Enterprise on Windows Servers](https://hub.docker.com/editions/enterprise/docker-ee-server-windows).
|
||||
-->
|
||||
安装 Docker
|
||||
操作指南在 [Install Docker Engine - Enterprise on Windows Servers](https://hub.docker.com/editions/enterprise/docker-ee-server-windows)。
|
||||
|
||||
<!--
|
||||
#### Install wins, kubelet, and kubeadm.
|
||||
-->
|
||||
#### 安装 wins、kubelet 和 kubeadm
|
||||
|
||||
```PowerShell
|
||||
curl.exe -LO https://github.com/kubernetes-sigs/sig-windows-tools/releases/latest/download/PrepareNode.ps1
|
||||
curl.exe -LO https://raw.githubusercontent.com/kubernetes-sigs/sig-windows-tools/master/kubeadm/scripts/PrepareNode.ps1
|
||||
.\PrepareNode.ps1 -KubernetesVersion {{< param "fullversion" >}}
|
||||
```
|
||||
|
||||
<!--
|
||||
1. Run `kubeadm` to join the node
|
||||
#### Run `kubeadm` to join the node
|
||||
|
||||
Use the command that was given to you when you ran `kubeadm init` on a control plane host.
|
||||
If you no longer have this command, or the token has expired, you can run `kubeadm token create -print-join-command`
|
||||
(on a control plane host) to generate a new token and join command.
|
||||
-->
|
||||
2. 运行 `kubeadm` 添加节点
|
||||
#### 运行 `kubeadm` 添加节点
|
||||
|
||||
当你在控制面主机上运行 `kubeadm init` 时,输出了一个命令。现在运行这个命令。
|
||||
如果你找不到这个命令,或者命令中对应的令牌已经过期,你可以(在一个控制面主机上)运行
|
||||
`kubeadm token create --print-join-command` 来生成新的令牌和 join 命令。
|
||||
|
||||
{{% /tab %}}
|
||||
{{% tab name="CRI-containerD" %}}
|
||||
|
||||
<!--
|
||||
#### Install containerD
|
||||
-->
|
||||
|
||||
#### 安装 containerD
|
||||
|
||||
```powershell
|
||||
curl.exe -LO https://github.com/kubernetes-sigs/sig-windows-tools/releases/latest/download/Install-Containerd.ps1
|
||||
.\Install-Containerd.ps1
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
<!--
|
||||
To install a specific version of containerD specify the version with -ContainerDVersion.
|
||||
-->
|
||||
要安装特定版本的 containerD,使用参数 -ContainerDVersion指定版本。
|
||||
|
||||
```powershell
|
||||
# Example
|
||||
.\Install-Containerd.ps1 -ContainerDVersion 1.4.1
|
||||
```
|
||||
|
||||
{{< /note >}}
|
||||
|
||||
{{< note >}}
|
||||
<!--
|
||||
If you're using a different interface rather than Ethernet (i.e. "Ethernet0 2") on the Windows nodes, specify the name with `-netAdapterName`.
|
||||
-->
|
||||
如果你在 Windows 节点上使用了与 Ethernet 不同的接口(例如 "Ethernet0 2"),使用参数 `-netAdapterName` 指定名称。
|
||||
|
||||
```powershell
|
||||
# Example
|
||||
.\Install-Containerd.ps1 -netAdapterName "Ethernet0 2"
|
||||
```
|
||||
|
||||
{{< /note >}}
|
||||
|
||||
<!--
|
||||
#### Install wins, kubelet, and kubeadm
|
||||
-->
|
||||
#### 安装 wins,kubelet 和 kubeadm
|
||||
|
||||
```PowerShell
|
||||
curl.exe -LO https://raw.githubusercontent.com/kubernetes-sigs/sig-windows-tools/master/kubeadm/scripts/PrepareNode.ps1
|
||||
.\PrepareNode.ps1 -KubernetesVersion {{< param "fullversion" >}} -ContainerRuntime containerD
|
||||
```
|
||||
|
||||
<!--
|
||||
#### Run `kubeadm` to join the node
|
||||
|
||||
Use the command that was given to you when you ran `kubeadm init` on a control plane host.
|
||||
If you no longer have this command, or the token has expired, you can run `kubeadm token create --print-join-command`
|
||||
(on a control plane host) to generate a new token and join command.
|
||||
-->
|
||||
#### 运行 `kubeadm` 添加节点
|
||||
|
||||
使用当你在控制面主机上运行 `kubeadm init` 时得到的命令。
|
||||
如果你找不到这个命令,或者命令中对应的令牌已经过期,你可以(在一个控制面主机上)运行
|
||||
`kubeadm token create --print-join-command` 来生成新的令牌和 join 命令。
|
||||
|
||||
{{< note >}}
|
||||
If using **CRI-containerD** add `--cri-socket "npipe:////./pipe/containerd-containerd"` to the kubeadm call
|
||||
{{< /note >}}
|
||||
|
||||
{{% /tab %}}
|
||||
{{< /tabs >}}
|
||||
|
||||
<!--
|
||||
#### Verifying your installation
|
||||
|
||||
|
||||
@@ -62,14 +62,12 @@ kubeadm 支持在执行 `kubeadm init` 时,传递一个 `KubeletConfiguration`
|
||||
`KubeletConfiguration` 包含 `cgroupDriver` 字段,可用于控制 kubelet 的 cgroup 驱动。
|
||||
|
||||
<!--
|
||||
If the user is not setting the `cgroupDriver` field under `KubeletConfiguration`,
|
||||
In v1.22, if the user is not setting the `cgroupDriver` field under `KubeletConfiguration`,
|
||||
`kubeadm init` will default it to `systemd`.
|
||||
-->
|
||||
|
||||
{{< feature-state for_k8s_version="v1.21" state="stable" >}}
|
||||
|
||||
{{< note >}}
|
||||
如果用户没有在 `KubeletConfiguration` 中设置 `cgroupDriver` 字段,
|
||||
在版本 1.22 中,如果用户没有在 `KubeletConfiguration` 中设置 `cgroupDriver` 字段,
|
||||
`kubeadm init` 会将它设置为默认值 `systemd`。
|
||||
{{< /note >}}
|
||||
|
||||
@@ -81,7 +79,7 @@ A minimal example of configuring the field explicitly:
|
||||
```yaml
|
||||
# kubeadm-config.yaml
|
||||
kind: ClusterConfiguration
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
apiVersion: kubeadm.k8s.io/v1beta3
|
||||
kubernetesVersion: v1.21.0
|
||||
---
|
||||
kind: KubeletConfiguration
|
||||
|
||||
@@ -234,10 +234,28 @@ You can renew your certificates manually at any time with the `kubeadm certs ren
|
||||
你能随时通过 `kubeadm certs renew` 命令手动更新你的证书。
|
||||
|
||||
<!--
|
||||
This command performs the renewal using CA (or front-proxy-CA) certificate and key stored in `/etc/kubernetes/pki`.
|
||||
This command performs the renewal using CA (or front-proxy-CA) certificate and key stored in `/etc/kubernetes/pki`.
|
||||
|
||||
After running the command you should restart the control plane Pods. This is required since
|
||||
dynamic certificate reload is currently not supported for all components and certificates.
|
||||
[Static Pods](/docs/tasks/configure-pod-container/static-pod/) are managed by the local kubelet
|
||||
and not by the API Server, thus kubectl cannot be used to delete and restart them.
|
||||
To restart a static Pod you can temporarily remove its manifest file from `/etc/kubernetes/manifests/`
|
||||
and wait for 20 seconds (see the `fileCheckFrequency` value in [KubeletConfiguration struct](/docs/reference/config-api/kubelet-config.v1beta1/).
|
||||
The kubelet will terminate the Pod if it's no longer in the manifest directory.
|
||||
You can then move the file back and after another `fileCheckFrequency` period, the kubelet will recreate
|
||||
the Pod and the certificate renewal for the component can complete.
|
||||
-->
|
||||
此命令用 CA (或者 front-proxy-CA )证书和存储在 `/etc/kubernetes/pki` 中的密钥执行更新。
|
||||
|
||||
执行完此命令之后你需要重启控制面 Pods。因为动态证书重载目前还不被所有组件和证书支持,所有这项操作是必须的。
|
||||
[静态 Pods](/zh/docs/tasks/configure-pod-container/static-pod/) 是被本地 kubelet 而不是 API Server 管理,
|
||||
所以 kubectl 不能用来删除或重启他们。
|
||||
要重启静态 Pod 你可以临时将清单文件从 `/etc/kubernetes/manifests/` 移除并等待 20 秒
|
||||
(参考 [KubeletConfiguration 结构](/docs/reference/config-api/kubelet-config.v1beta1/) 中的`fileCheckFrequency` 值)。
|
||||
如果 Pod 不在清单目录里,kubelet将会终止它。
|
||||
在另一个 `fileCheckFrequency` 周期之后你可以将文件移回去,为了组件可以完成 kubelet 将重新创建 Pod 和证书更新。
|
||||
|
||||
<!--
|
||||
If you are running an HA cluster, this command needs to be executed on all the control-plane nodes.
|
||||
-->
|
||||
@@ -311,13 +329,13 @@ Kubernetes 证书颁发机构不是开箱即用。
|
||||
要激活内置签名者,请传递 `--cluster-signing-cert-file` 和 `--cluster-signing-key-file` 参数。
|
||||
|
||||
<!--
|
||||
If you're creating a new cluster, you can use a kubeadm [configuration file](/docs/reference/config-api/kubeadm-config.v1beta2/):
|
||||
If you're creating a new cluster, you can use a kubeadm [configuration file](https://godoc.org/k8s.io/kubernetes/cmd/kubeadm/app/apis/kubeadm/v1beta3):
|
||||
-->
|
||||
如果你正在创建一个新的集群,你可以使用 kubeadm 的
|
||||
[配置文件](/docs/reference/config-api/kubeadm-config.v1beta2/)。
|
||||
[配置文件](/docs/reference/config-api/kubeadm-config.v1beta3/)。
|
||||
|
||||
```yaml
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
apiVersion: kubeadm.k8s.io/v1beta3
|
||||
kind: ClusterConfiguration
|
||||
controllerManager:
|
||||
extraArgs:
|
||||
@@ -441,7 +459,7 @@ certificates you must pass the following minimal configuration to `kubeadm init`
|
||||
你必须向 `kubeadm init` 传递如下最小配置数据:
|
||||
|
||||
```yaml
|
||||
apiVersion: kubeadm.k8s.io/v1beta2
|
||||
apiVersion: kubeadm.k8s.io/v1beta3
|
||||
kind: ClusterConfiguration
|
||||
---
|
||||
apiVersion: kubelet.config.k8s.io/v1beta1
|
||||
|
||||
Reference in New Issue
Block a user