Skip to content

Commit d7e7824

Browse files
authored
Merge pull request #39228 from asarenkansah/kubectl-macos-cleanup
Add cleanup commands to kubectl MacOS install
2 parents 136547a + a0407eb commit d7e7824

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

content/en/docs/tasks/tools/install-kubectl-macos.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,15 @@ Using the latest compatible version of kubectl helps avoid unforeseen issues.
1919

2020
The following methods exist for installing kubectl on macOS:
2121

22-
- [Install kubectl binary with curl on macOS](#install-kubectl-binary-with-curl-on-macos)
23-
- [Install with Homebrew on macOS](#install-with-homebrew-on-macos)
24-
- [Install with Macports on macOS](#install-with-macports-on-macos)
22+
- [Install kubectl on macOS](#install-kubectl-on-macos)
23+
- [Install kubectl binary with curl on macOS](#install-kubectl-binary-with-curl-on-macos)
24+
- [Install with Homebrew on macOS](#install-with-homebrew-on-macos)
25+
- [Install with Macports on macOS](#install-with-macports-on-macos)
26+
- [Verify kubectl configuration](#verify-kubectl-configuration)
27+
- [Optional kubectl configurations and plugins](#optional-kubectl-configurations-and-plugins)
28+
- [Enable shell autocompletion](#enable-shell-autocompletion)
29+
- [Install `kubectl convert` plugin](#install-kubectl-convert-plugin)
30+
- [{{% heading "whatsnext" %}}](#-heading-whatsnext-)
2531

2632
### Install kubectl binary with curl on macOS
2733

@@ -117,6 +123,12 @@ The following methods exist for installing kubectl on macOS:
117123
kubectl version --client --output=yaml
118124
```
119125

126+
1. After installing the plugin, clean up the installation files:
127+
128+
```bash
129+
rm kubectl kubectl.sha256
130+
```
131+
120132
### Install with Homebrew on macOS
121133

122134
If you are on macOS and using [Homebrew](https://brew.sh/) package manager, you can install kubectl with Homebrew.
@@ -250,6 +262,12 @@ Below are the procedures to set up autocompletion for Bash, Fish, and Zsh.
250262

251263
If you do not see an error, it means the plugin is successfully installed.
252264

265+
1. After installing the plugin, clean up the installation files:
266+
267+
```bash
268+
rm kubectl kubectl.sha256
269+
```
270+
253271
## {{% heading "whatsnext" %}}
254272

255273
{{< include "included/kubectl-whats-next.md" >}}

0 commit comments

Comments
 (0)