Move kubectl-convert installation info under Optional kubectl configurations and plugins
Signed-off-by: bhumijgupta <bhumijgupta@gmail.com>
This commit is contained in:
@@ -36,16 +36,6 @@ The following methods exist for installing kubectl on macOS:
|
||||
{{< /tab >}}
|
||||
{{< /tabs >}}
|
||||
|
||||
Download kubectl-convert (optional)
|
||||
{{< tabs name="download_binary_macos" >}}
|
||||
{{< tab name="Intel" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl-convert"
|
||||
{{< /tab >}}
|
||||
{{< tab name="Apple Silicon" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl-convert"
|
||||
{{< /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.
|
||||
|
||||
@@ -63,7 +53,7 @@ The following methods exist for installing kubectl on macOS:
|
||||
|
||||
{{< /note >}}
|
||||
|
||||
1. Validate the kubectl binary (optional)
|
||||
1. Validate the binary (optional)
|
||||
|
||||
Download the kubectl checksum file:
|
||||
|
||||
@@ -99,54 +89,12 @@ The following methods exist for installing kubectl on macOS:
|
||||
Download the same version of the binary and checksum.
|
||||
{{< /note >}}
|
||||
|
||||
1. Validate the kubectl-convert binary (optional)
|
||||
|
||||
Download the kubectl checksum file:
|
||||
|
||||
{{< tabs name="download_checksum_macos" >}}
|
||||
{{< tab name="Intel" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl-convert.sha256"
|
||||
{{< /tab >}}
|
||||
{{< tab name="Apple Silicon" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl-convert.sha256"
|
||||
{{< /tab >}}
|
||||
{{< /tabs >}}
|
||||
|
||||
Validate the kubectl binary against the checksum file:
|
||||
|
||||
```bash
|
||||
echo "$(<kubectl-convert.sha256) kubectl-convert" | shasum -a 256 --check
|
||||
```
|
||||
|
||||
If valid, the output is:
|
||||
|
||||
```console
|
||||
kubectl-convert: OK
|
||||
```
|
||||
|
||||
If the check fails, `shasum` exits with nonzero status and prints output similar to:
|
||||
|
||||
```bash
|
||||
kubectl-convert: FAILED
|
||||
shasum: WARNING: 1 computed checksum did NOT match
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
Download the same version of the binary and checksum.
|
||||
{{< /note >}}
|
||||
|
||||
1. Make the kubectl binary executable.
|
||||
|
||||
```bash
|
||||
chmod +x ./kubectl
|
||||
```
|
||||
|
||||
Make kubectl-convert binary executable (optional).
|
||||
|
||||
```bash
|
||||
chmod +x ./kubectl-convert
|
||||
```
|
||||
|
||||
1. Move the kubectl binary to a file location on your system `PATH`.
|
||||
|
||||
```bash
|
||||
@@ -154,13 +102,6 @@ The following methods exist for installing kubectl on macOS:
|
||||
sudo chown root: /usr/local/bin/kubectl
|
||||
```
|
||||
|
||||
Move the kubectl-convert binary to your system `PATH` (optional)
|
||||
|
||||
```bash
|
||||
sudo mv ./kubectl /usr/local/bin/kubectl-convert
|
||||
sudo chown root: /usr/local/bin/kubectl-convert
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
Make sure `/usr/local/bin` is in your PATH environment variable.
|
||||
{{< /note >}}
|
||||
@@ -214,7 +155,7 @@ If you are on macOS and using [Macports](https://macports.org/) package manager,
|
||||
|
||||
{{< include "included/verify-kubectl.md" >}}
|
||||
|
||||
## Optional kubectl configurations
|
||||
## Optional kubectl configurations and plugins
|
||||
|
||||
### Enable shell autocompletion
|
||||
|
||||
@@ -227,6 +168,74 @@ Below are the procedures to set up autocompletion for Bash and Zsh.
|
||||
{{< tab name="Zsh" include="included/optional-kubectl-configs-zsh.md" />}}
|
||||
{{< /tabs >}}
|
||||
|
||||
### Install kubectl convert plugin
|
||||
|
||||
{{< include "included/kubectl-convert-overview.md" >}}
|
||||
|
||||
1. Download the latest release with the command:
|
||||
|
||||
{{< tabs name="download_convert_binary_macos" >}}
|
||||
{{< tab name="Intel" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl-convert"
|
||||
{{< /tab >}}
|
||||
{{< tab name="Apple Silicon" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl-convert"
|
||||
{{< /tab >}}
|
||||
{{< /tabs >}}
|
||||
|
||||
1. Validate the binary (optional)
|
||||
|
||||
Download the kubectl checksum file:
|
||||
|
||||
{{< tabs name="download_convert_checksum_macos" >}}
|
||||
{{< tab name="Intel" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl-convert.sha256"
|
||||
{{< /tab >}}
|
||||
{{< tab name="Apple Silicon" codelang="bash" >}}
|
||||
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl-convert.sha256"
|
||||
{{< /tab >}}
|
||||
{{< /tabs >}}
|
||||
|
||||
Validate the kubectl-convert binary against the checksum file:
|
||||
|
||||
```bash
|
||||
echo "$(<kubectl-convert.sha256) kubectl-convert" | shasum -a 256 --check
|
||||
```
|
||||
|
||||
If valid, the output is:
|
||||
|
||||
```console
|
||||
kubectl-convert: OK
|
||||
```
|
||||
|
||||
If the check fails, `shasum` exits with nonzero status and prints output similar to:
|
||||
|
||||
```bash
|
||||
kubectl-convert: FAILED
|
||||
shasum: WARNING: 1 computed checksum did NOT match
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
Download the same version of the binary and checksum.
|
||||
{{< /note >}}
|
||||
|
||||
1. Make kubectl-convert binary executable
|
||||
|
||||
```bash
|
||||
chmod +x ./kubectl-convert
|
||||
```
|
||||
|
||||
1. Move the kubectl-convert binary to a file location on your system `PATH`.
|
||||
|
||||
```bash
|
||||
sudo mv ./kubectl /usr/local/bin/kubectl-convert
|
||||
sudo chown root: /usr/local/bin/kubectl-convert
|
||||
```
|
||||
|
||||
{{< note >}}
|
||||
Make sure `/usr/local/bin` is in your PATH environment variable.
|
||||
{{< /note >}}
|
||||
|
||||
## {{% heading "whatsnext" %}}
|
||||
|
||||
{{< include "included/kubectl-whats-next.md" >}}
|
||||
|
||||
Reference in New Issue
Block a user