Merge pull request #39298 from asarenkansah/kubectl-windows-cleanup

Add cleanup commands to kubectl Windows install
pull/39383/head
Kubernetes Prow Robot 2023-02-09 18:37:31 -08:00 committed by GitHub
commit 3f51242b55
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -72,6 +72,12 @@ The following methods exist for installing kubectl on Windows:
kubectl version --client --output=yaml kubectl version --client --output=yaml
``` ```
1. After installing the plugin, clean up the installation files:
```powershell
del kubectl.exe kubectl.exe.sha256
```
{{< note >}} {{< note >}}
[Docker Desktop for Windows](https://docs.docker.com/docker-for-windows/#kubernetes) adds its own version of `kubectl` to `PATH`. [Docker Desktop for Windows](https://docs.docker.com/docker-for-windows/#kubernetes) adds its own version of `kubectl` to `PATH`.
If you have installed Docker Desktop before, you may need to place your `PATH` entry before the one added by the Docker Desktop installer or remove the Docker Desktop's `kubectl`. If you have installed Docker Desktop before, you may need to place your `PATH` entry before the one added by the Docker Desktop installer or remove the Docker Desktop's `kubectl`.
@ -191,6 +197,12 @@ Below are the procedures to set up autocompletion for PowerShell.
If you do not see an error, it means the plugin is successfully installed. If you do not see an error, it means the plugin is successfully installed.
1. After installing the plugin, clean up the installation files:
```powershell
del kubectl-convert.exe kubectl-convert.exe.sha256
```
## {{% heading "whatsnext" %}} ## {{% heading "whatsnext" %}}
{{< include "included/kubectl-whats-next.md" >}} {{< include "included/kubectl-whats-next.md" >}}