[zh] Resync task files (5)

This commit is contained in:
Qiming Teng
2021-05-14 16:07:50 +08:00
parent 42313ab058
commit 29c0554d70
4 changed files with 176 additions and 163 deletions
@@ -8,7 +8,6 @@ card:
title: Windows 安装 kubectl
---
<!--
---
reviewers:
- mikedanese
title: Install and Set Up kubectl on Windows
@@ -18,18 +17,17 @@ card:
name: tasks
weight: 20
title: Install kubectl on Windows
---
-->
## {{% heading "prerequisites" %}}
<!--
You must use a kubectl version that is within one minor version difference of your cluster.
For example, a v1.2 client should work with v1.1, v1.2, and v1.3 master.
You must use a kubectl version that is within one minor version difference of your cluster. For example, a v{{< skew latestVersion >}} client can communicate with v{{< skew prevMinorVersion >}}, v{{< skew latestVersion >}}, and v{{< skew nextMinorVersion >}} control planes.
Using the latest version of kubectl helps avoid unforeseen issues.
-->
kubectl 版本和集群版本之间的差异必须在一个小版本号内。
例如:v1.2 版本的客户端能与 v1.1、v1.2 和 v1.3 版本的集群一起工作。
例如:v{{< skew latestVersion >}} 版本的客户端能与 v{{< skew prevMinorVersion >}}、
v{{< skew latestVersion >}} 和 v{{< skew nextMinorVersion >}} 版本的控制面通信。
用最新版的 kubectl 有助于避免不可预见的问题。
<!--
@@ -43,7 +41,6 @@ The following methods exist for installing kubectl on Windows:
在 Windows 系统中安装 kubectl 有如下几种方法:
- [用 curl 在 Windows 上安装 kubectl](#install-kubectl-binary-with-curl-on-windows)
- [用 PowerShell 从 PSGallery 安装](#install-with-powershell-from-psgallery)
- [在 Windows 上用 Chocolatey 或 Scoop 安装](#install-on-windows-using-chocolatey-or-scoop)
- [作为谷歌云 SDK 的一部分,在 Windows 上安装](#install-on-windows-as-part-of-the-google-cloud-sdk)
@@ -133,55 +130,6 @@ If you have installed Docker Desktop before, you may need to place your `PATH` e
或者直接删掉 Docker Desktop 的 `kubectl`。
{{< /note >}}
<!--
### Install with PowerShell from PSGallery
-->
### 用 PowerShell 从 PSGallery 安装 {#install-with-powershell-from-psgallery}
<!--
If you are on Windows and using the [PowerShell Gallery](https://www.powershellgallery.com/) package manager, you can install and update kubectl with PowerShell.
-->
如果你工作在 Windows 平台上,且使用 [PowerShell Gallery](https://www.powershellgallery.com/) 包管理器,
则可以用 PowerShell 安装、更新 kubectl。
<!--
1. Run the installation commands (making sure to specify a `DownloadLocation`):
-->
1. 运行安装命令(确保提供了参数 `DownloadLocation`):
```powershell
Install-Script -Name 'install-kubectl' -Scope CurrentUser -Force
install-kubectl.ps1 [-DownloadLocation <path>]
```
<!--
If you do not specify a `DownloadLocation`, `kubectl` will be installed in the user's `temp` Directory.
-->
{{< note >}}
如果没有指定 `DownloadLocation``kubectl` 则会被安装到用户的 `temp` 目录下。
{{< /note >}}
<!--
The installer creates `$HOME/.kube` and instructs it to create a config file.
-->
安装程序创建 `$HOME/.kube`,并指示其创建配置文件。
<!--
1. Test to ensure the version you installed is up-to-date:
-->
1. 测试一下,确保你安装的是最新版本:
```powershell
kubectl version --client
```
<!--
Updating the installation is performed by rerunning the two commands listed in step 1.
-->
{{< note >}}
更新安装是通过重新运行步骤 1 中的两个命令而实现。
{{< /note >}}
<!--
### Install on Windows using Chocolatey or Scoop
-->
@@ -298,4 +246,5 @@ kubectl 为 Bash 和 Zsh 提供自动补全功能,可以减轻许多输入的
## {{% heading "whatsnext" %}}
{{< include "included/kubectl-whats-next.md" >}}
{{< include "included/kubectl-whats-next.md" >}}