[zh-cn] sync install-kubectl-macos.md install-kubectl-windows.md install-kubectl-linux.md
upgrading-windows-nodes.md Signed-off-by: xin.li <xin.li@daocloud.io>pull/40991/head
parent
b6f2790452
commit
0ae2357d82
|
@ -46,15 +46,15 @@ upgrade the control plane nodes before upgrading your Windows nodes.
|
|||
1. From the Windows node, upgrade kubeadm:
|
||||
|
||||
```powershell
|
||||
# replace {{< param "fullversion" >}} with your desired version
|
||||
curl.exe -Lo <path-to-kubeadm.exe> "https://dl.k8s.io/{{< param "fullversion" >}}/bin/windows/amd64/kubeadm.exe"
|
||||
# replace {{< skew currentPatchVersion >}} with your desired version
|
||||
curl.exe -Lo <path-to-kubeadm.exe> "https://dl.k8s.io/{{< skew currentPatchVersion >}}/bin/windows/amd64/kubeadm.exe"
|
||||
```
|
||||
-->
|
||||
1. 在 Windows 节点上升级 kubeadm:
|
||||
|
||||
```powershell
|
||||
# 将 {{< param "fullversion" >}} 替换为你希望的版本
|
||||
curl.exe -Lo <kubeadm.exe 路径> "https://dl.k8s.io/{{< param "fullversion" >}}/bin/windows/amd64/kubeadm.exe"
|
||||
# 将 {{< skew currentPatchVersion >}} 替换为你希望的版本
|
||||
curl.exe -Lo <kubeadm.exe 路径> "https://dl.k8s.io/{{< skew currentPatchVersion >}}/bin/windows/amd64/kubeadm.exe"
|
||||
```
|
||||
|
||||
<!--
|
||||
|
@ -116,7 +116,7 @@ upgrade the control plane nodes before upgrading your Windows nodes.
|
|||
|
||||
```powershell
|
||||
stop-service kubelet
|
||||
curl.exe -Lo <path-to-kubelet.exe> "https://dl.k8s.io/{{< param "fullversion" >}}/bin/windows/amd64/kubelet.exe"
|
||||
curl.exe -Lo <path-to-kubelet.exe> "https://dl.k8s.io/{{< skew currentPatchVersion >}}/bin/windows/amd64/kubelet.exe"
|
||||
restart-service kubelet
|
||||
```
|
||||
-->
|
||||
|
@ -126,7 +126,7 @@ upgrade the control plane nodes before upgrading your Windows nodes.
|
|||
|
||||
```powershell
|
||||
stop-service kubelet
|
||||
curl.exe -Lo <kubelet.exe 路径> "https://dl.k8s.io/{{< param "fullversion" >}}/bin/windows/amd64/kubelet.exe"
|
||||
curl.exe -Lo <kubelet.exe 路径> "https://dl.k8s.io/{{< skew currentPatchVersion >}}/bin/windows/amd64/kubelet.exe"
|
||||
restart-service kubelet
|
||||
```
|
||||
|
||||
|
@ -135,7 +135,7 @@ upgrade the control plane nodes before upgrading your Windows nodes.
|
|||
|
||||
```powershell
|
||||
stop-service kube-proxy
|
||||
curl.exe -Lo <path-to-kube-proxy.exe> "https://dl.k8s.io/{{< param "fullversion" >}}/bin/windows/amd64/kube-proxy.exe"
|
||||
curl.exe -Lo <path-to-kube-proxy.exe> "https://dl.k8s.io/{{< skew currentPatchVersion >}}/bin/windows/amd64/kube-proxy.exe"
|
||||
restart-service kube-proxy
|
||||
```
|
||||
-->
|
||||
|
@ -143,7 +143,7 @@ upgrade the control plane nodes before upgrading your Windows nodes.
|
|||
|
||||
```powershell
|
||||
stop-service kube-proxy
|
||||
curl.exe -Lo <kube-proxy.exe 路径> "https://dl.k8s.io/{{< param "fullversion" >}}/bin/windows/amd64/kube-proxy.exe"
|
||||
curl.exe -Lo <kube-proxy.exe 路径> "https://dl.k8s.io/{{< skew currentPatchVersion >}}/bin/windows/amd64/kube-proxy.exe"
|
||||
restart-service kube-proxy
|
||||
```
|
||||
|
||||
|
|
|
@ -62,24 +62,38 @@ The following methods exist for installing kubectl on Linux:
|
|||
-->
|
||||
1. 用以下命令下载最新发行版:
|
||||
|
||||
```bash
|
||||
{{< tabs name="download_binary_linux" >}}
|
||||
{{< tab name="x86-64" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
|
||||
```
|
||||
{{< /tab >}}
|
||||
{{< tab name="ARM64" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl"
|
||||
{{< /tab >}}
|
||||
{{< /tabs >}}
|
||||
|
||||
{{< note >}}
|
||||
<!--
|
||||
To download a specific version, replace the `$(curl -L -s https://dl.k8s.io/release/stable.txt)`
|
||||
portion of the command with the specific version.
|
||||
|
||||
For example, to download version {{< param "fullversion" >}} on Linux, type:
|
||||
For example, to download version {{< skew currentPatchVersion >}} on Linux x86-64, type:
|
||||
-->
|
||||
如需下载某个指定的版本,请用指定版本号替换该命令的这一部分:
|
||||
`$(curl -L -s https://dl.k8s.io/release/stable.txt)`。
|
||||
|
||||
例如,要在 Linux 中下载 {{< param "fullversion" >}} 版本,请输入:
|
||||
例如,要在 Linux x86-64 中下载 {{< skew currentPatchVersion >}} 版本,请输入:
|
||||
|
||||
```bash
|
||||
curl -LO https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/linux/amd64/kubectl
|
||||
curl -LO https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/linux/amd64/kubectl
|
||||
```
|
||||
|
||||
<!--
|
||||
And for Linux ARM64, type:
|
||||
-->
|
||||
对于 Linux ARM64 来说,请输入:
|
||||
|
||||
```bash
|
||||
curl -LO https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/linux/arm64/kubectl
|
||||
```
|
||||
{{< /note >}}
|
||||
|
||||
|
@ -92,9 +106,14 @@ The following methods exist for installing kubectl on Linux:
|
|||
|
||||
下载 kubectl 校验和文件:
|
||||
|
||||
```bash
|
||||
{{< tabs name="download_checksum_linux" >}}
|
||||
{{< tab name="x86-64" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl.sha256"
|
||||
```
|
||||
{{< /tab >}}
|
||||
{{< tab name="ARM64" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl.sha256"
|
||||
{{< /tab >}}
|
||||
{{< /tabs >}}
|
||||
|
||||
<!--
|
||||
Validate the kubectl binary against the checksum file:
|
||||
|
@ -170,9 +189,11 @@ Or use this for detailed view of version:
|
|||
The above command will generate a warning:
|
||||
-->
|
||||
上面的命令会产生一个警告:
|
||||
|
||||
```
|
||||
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.
|
||||
```
|
||||
|
||||
<!--
|
||||
You can ignore this warning. You are only checking the version of `kubectl` that you
|
||||
have installed.
|
||||
|
@ -180,7 +201,11 @@ Or use this for detailed view of version:
|
|||
你可以忽略这个警告。你只检查你所安装的 `kubectl` 的版本。
|
||||
{{< /note >}}
|
||||
|
||||
<!--
|
||||
Or use this for detailed view of version:
|
||||
-->
|
||||
或者使用如下命令来查看版本的详细信息:
|
||||
|
||||
```cmd
|
||||
kubectl version --client --output=yaml
|
||||
```
|
||||
|
@ -202,10 +227,10 @@ Or use this for detailed view of version:
|
|||
sudo apt-get update
|
||||
sudo apt-get install -y ca-certificates curl
|
||||
```
|
||||
|
||||
<!--
|
||||
If you use Debian 9 (stretch) or earlier you would also need to install `apt-transport-https`:
|
||||
-->
|
||||
|
||||
-->
|
||||
如果你使用 Debian 9(stretch)或更早版本,则你还需要安装 `apt-transport-https`:
|
||||
|
||||
```shell
|
||||
|
@ -242,6 +267,7 @@ Or use this for detailed view of version:
|
|||
sudo apt-get update
|
||||
sudo apt-get install -y kubectl
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
<!--
|
||||
In releases older than Debian 12 and Ubuntu 22.04, `/etc/apt/keyrings` does not exist by default.
|
||||
|
@ -355,9 +381,15 @@ kubectl 为 Bash、Zsh、Fish 和 PowerShell 提供自动补全功能,可以
|
|||
-->
|
||||
1. 用以下命令下载最新发行版:
|
||||
|
||||
```bash
|
||||
{{< tabs name="download_binary_linux" >}}
|
||||
{{< tab name="x86-64" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert"
|
||||
```
|
||||
{{< /tab >}}
|
||||
{{< tab name="ARM64" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl"
|
||||
{{< /tab >}}
|
||||
{{< /tabs >}}
|
||||
|
||||
<!--
|
||||
1. Validate the binary (optional)
|
||||
|
||||
|
@ -367,9 +399,14 @@ kubectl 为 Bash、Zsh、Fish 和 PowerShell 提供自动补全功能,可以
|
|||
|
||||
下载 kubectl-convert 校验和文件:
|
||||
|
||||
```bash
|
||||
{{< tabs name="download_convert_checksum_linux" >}}
|
||||
{{< tab name="x86-64" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert.sha256"
|
||||
```
|
||||
{{< /tab >}}
|
||||
{{< tab name="ARM64" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl-convert.sha256"
|
||||
{{< /tab >}}
|
||||
{{< /tabs >}}
|
||||
|
||||
<!--
|
||||
Validate the kubectl-convert binary against the checksum file:
|
||||
|
|
|
@ -86,13 +86,13 @@ The following methods exist for installing kubectl on macOS:
|
|||
To download a specific version, replace the `$(curl -L -s https://dl.k8s.io/release/stable.txt)`
|
||||
portion of the command with the specific version.
|
||||
|
||||
For example, to download version {{< param "fullversion" >}} on Intel macOS, type:
|
||||
For example, to download version {{< skew currentPatchVersion >}} on Intel macOS, type:
|
||||
-->
|
||||
如果需要下载某个指定的版本,用该指定版本号替换掉命令的这个部分:`$(curl -L -s https://dl.k8s.io/release/stable.txt)`。
|
||||
例如:要为 Intel macOS 系统下载 {{< param "fullversion" >}} 版本,则输入:
|
||||
例如:要为 Intel macOS 系统下载 {{< skew currentPatchVersion >}} 版本,则输入:
|
||||
|
||||
```bash
|
||||
curl -LO "https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/darwin/amd64/kubectl"
|
||||
curl -LO "https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/darwin/amd64/kubectl"
|
||||
```
|
||||
|
||||
<!--
|
||||
|
@ -101,7 +101,7 @@ The following methods exist for installing kubectl on macOS:
|
|||
对于 Apple Silicon 版本的 macOS,输入:
|
||||
|
||||
```bash
|
||||
curl -LO "https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/darwin/arm64/kubectl"
|
||||
curl -LO "https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/darwin/arm64/kubectl"
|
||||
```
|
||||
{{< /note >}}
|
||||
|
||||
|
@ -131,6 +131,7 @@ The following methods exist for installing kubectl on macOS:
|
|||
```bash
|
||||
echo "$(cat kubectl.sha256) kubectl" | shasum -a 256 --check
|
||||
```
|
||||
|
||||
<!--
|
||||
If valid, the output is:
|
||||
-->
|
||||
|
|
|
@ -57,7 +57,13 @@ The following methods exist for installing kubectl on Windows:
|
|||
<!--
|
||||
1. Download the [latest release {{< param "fullversion" >}}](https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe).
|
||||
-->
|
||||
1. 下载[最新发行版 {{< param "fullversion" >}}](https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe)。
|
||||
<!--
|
||||
1. Download the latest {{< skew currentVersion >}} patch release:
|
||||
[kubectl {{< skew currentPatchVersion >}}](https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubectl.exe).
|
||||
-->
|
||||
|
||||
1. 下载最新补丁版 {{< skew currentVersion >}}:
|
||||
[kubectl {{< skew currentPatchVersion >}}](https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubectl.exe)。
|
||||
|
||||
<!--
|
||||
Or if you have `curl` installed, use this command:
|
||||
|
@ -65,7 +71,7 @@ The following methods exist for installing kubectl on Windows:
|
|||
如果你已安装了 `curl`,也可以使用此命令:
|
||||
|
||||
```powershell
|
||||
curl.exe -LO "https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe"
|
||||
curl.exe -LO "https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubectl.exe"
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
|
@ -86,7 +92,7 @@ The following methods exist for installing kubectl on Windows:
|
|||
下载 `kubectl` 校验和文件:
|
||||
|
||||
```powershell
|
||||
curl.exe -LO "https://dl.k8s.io/{{< param "fullversion" >}}/bin/windows/amd64/kubectl.exe.sha256"
|
||||
curl.exe -LO "https://dl.k8s.io/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubectl-convert.exe.sha256"
|
||||
```
|
||||
|
||||
<!--
|
||||
|
@ -154,15 +160,6 @@ The following methods exist for installing kubectl on Windows:
|
|||
kubectl version --client --output=yaml
|
||||
```
|
||||
|
||||
<!--
|
||||
1. After installing the plugin, clean up the installation files:
|
||||
-->
|
||||
5. 安装插件后,清理安装文件:
|
||||
|
||||
```powershell
|
||||
del kubectl.exe kubectl.exe.sha256
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
<!--
|
||||
[Docker Desktop for Windows](https://docs.docker.com/docker-for-windows/#kubernetes)
|
||||
|
@ -301,7 +298,7 @@ kubectl 为 Bash、Zsh、Fish 和 PowerShell 提供自动补全功能,可以
|
|||
1. 用以下命令下载最新发行版:
|
||||
|
||||
```powershell
|
||||
curl.exe -LO "https://dl.k8s.io/release/{{< param "fullversion" >}}/bin/windows/amd64/kubectl-convert.exe"
|
||||
curl.exe -LO "https://dl.k8s.io/release/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubectl-convert.exe"
|
||||
```
|
||||
|
||||
<!--
|
||||
|
@ -315,7 +312,7 @@ kubectl 为 Bash、Zsh、Fish 和 PowerShell 提供自动补全功能,可以
|
|||
下载 `kubectl-convert` 校验和文件:
|
||||
|
||||
```powershell
|
||||
curl.exe -LO "https://dl.k8s.io/{{< param "fullversion" >}}/bin/windows/amd64/kubectl-convert.exe.sha256"
|
||||
curl.exe -LO "https://dl.k8s.io/v{{< skew currentPatchVersion >}}/bin/windows/amd64/kubectl.exe.sha256"
|
||||
```
|
||||
|
||||
<!--
|
||||
|
|
Loading…
Reference in New Issue