Skip to content

Commit ca3286f

Browse files
committed
Add cleanup commands to kubectl MacOS install
1 parent 8a320d4 commit ca3286f

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

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

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,16 @@ 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+
- [{{% heading "prerequisites" %}}](#-heading-prerequisites-)
23+
- [Install kubectl on macOS](#install-kubectl-on-macos)
24+
- [Install kubectl binary with curl on macOS](#install-kubectl-binary-with-curl-on-macos)
25+
- [Install with Homebrew on macOS](#install-with-homebrew-on-macos)
26+
- [Install with Macports on macOS](#install-with-macports-on-macos)
27+
- [Verify kubectl configuration](#verify-kubectl-configuration)
28+
- [Optional kubectl configurations and plugins](#optional-kubectl-configurations-and-plugins)
29+
- [Enable shell autocompletion](#enable-shell-autocompletion)
30+
- [Install `kubectl convert` plugin](#install-kubectl-convert-plugin)
31+
- [{{% heading "whatsnext" %}}](#-heading-whatsnext-)
2532

2633
### Install kubectl binary with curl on macOS
2734

@@ -117,6 +124,12 @@ The following methods exist for installing kubectl on macOS:
117124
kubectl version --client --output=yaml
118125
```
119126

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

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

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

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

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

0 commit comments

Comments
 (0)