Skip to content

Commit 956eb48

Browse files
committed
Move kubectl-convert installation info under Optional kubectl configurations and plugins
Signed-off-by: bhumijgupta <[email protected]>
1 parent 34b701c commit 956eb48

File tree

5 files changed

+166
-138
lines changed

5 files changed

+166
-138
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: "kubectl-convert overview"
3+
description: "What is kubectl-convert plugin?"
4+
headless: true
5+
---
6+
7+
kubectl-convert is a kubectl plugin which allows to convert manifests between different api
8+
versions. This can be particularly helpful to migrate manifests to a non-deprecated api version.
9+
For more info, visit [migrate to non deprecated apis](/docs/reference/using-api/deprecation-guide/#migrate-to-non-deprecated-apis)

content/en/docs/tasks/tools/included/kubectl-whats-next.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ description: "What's next after installing kubectl."
44
headless: true
55
---
66

7-
* [What is kubectl-convert](/docs/reference/using-api/deprecation-guide/#migrate-to-non-deprecated-apis)
87
* [Install Minikube](https://minikube.sigs.k8s.io/docs/start/)
98
* See the [getting started guides](/docs/setup/) for more about creating clusters.
109
* [Learn how to launch and expose your application.](/docs/tasks/access-application-cluster/service-access-application-cluster/)

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

Lines changed: 50 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,7 @@ For example, to download version {{< param "fullversion" >}} on Linux, type:
4141
```
4242
{{< /note >}}
4343

44-
Download kubectl-convert (optional)
45-
46-
```bash
47-
curl -LO https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert
48-
```
49-
50-
1. Validate the kubectl binary (optional)
44+
1. Validate the binary (optional)
5145

5246
Download the kubectl checksum file:
5347

@@ -78,49 +72,12 @@ For example, to download version {{< param "fullversion" >}} on Linux, type:
7872
Download the same version of the binary and checksum.
7973
{{< /note >}}
8074

81-
1. Validate the kubectl-convert binary (optional)
82-
83-
Download the kubectl-convert checksum file:
84-
85-
```bash
86-
curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert.sha256"
87-
```
88-
89-
Validate the kubectl-convert binary against the checksum file:
90-
91-
```bash
92-
echo "$(<kubectl-convert.sha256) kubectl-convert" | sha256sum --check
93-
```
94-
95-
If valid, the output is:
96-
97-
```console
98-
kubectl-convert: OK
99-
```
100-
101-
If the check fails, `sha256` exits with nonzero status and prints output similar to:
102-
103-
```bash
104-
kubectl-convert: FAILED
105-
sha256sum: WARNING: 1 computed checksum did NOT match
106-
```
107-
108-
{{< note >}}
109-
Download the same version of the binary and checksum.
110-
{{< /note >}}
111-
11275
1. Install kubectl
11376

11477
```bash
11578
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
11679
```
11780

118-
Install kubectl-convert (optional)
119-
120-
```bash
121-
sudo install -o root -g root -m 0755 kubectl-convert /usr/local/bin/kubectl-convert
122-
```
123-
12481
{{< note >}}
12582
If you do not have root access on the target system, you can still install kubectl to the `~/.local/bin` directory:
12683

@@ -214,7 +171,7 @@ kubectl version --client
214171

215172
{{< include "included/verify-kubectl.md" >}}
216173

217-
## Optional kubectl configurations
174+
## Optional kubectl configurations and plugins
218175

219176
### Enable shell autocompletion
220177

@@ -227,6 +184,54 @@ Below are the procedures to set up autocompletion for Bash and Zsh.
227184
{{< tab name="Zsh" include="included/optional-kubectl-configs-zsh.md" />}}
228185
{{< /tabs >}}
229186

187+
### Install kubectl convert plugin
188+
189+
{{< include "included/kubectl-convert-overview.md" >}}
190+
191+
1. Download the latest release with the command:
192+
193+
```bash
194+
curl -LO https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert
195+
```
196+
197+
1. Validate the binary (optional)
198+
199+
Download the kubectl-convert checksum file:
200+
201+
```bash
202+
curl -LO "https://dl.k8s.io/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl-convert.sha256"
203+
```
204+
205+
Validate the kubectl-convert binary against the checksum file:
206+
207+
```bash
208+
echo "$(<kubectl-convert.sha256) kubectl-convert" | sha256sum --check
209+
```
210+
211+
If valid, the output is:
212+
213+
```console
214+
kubectl-convert: OK
215+
```
216+
217+
If the check fails, `sha256` exits with nonzero status and prints output similar to:
218+
219+
```bash
220+
kubectl-convert: FAILED
221+
sha256sum: WARNING: 1 computed checksum did NOT match
222+
```
223+
224+
{{< note >}}
225+
Download the same version of the binary and checksum.
226+
{{< /note >}}
227+
228+
1. Install kubectl-convert
229+
230+
```bash
231+
sudo install -o root -g root -m 0755 kubectl-convert /usr/local/bin/kubectl-convert
232+
```
233+
234+
230235
## {{% heading "whatsnext" %}}
231236

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

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

Lines changed: 70 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -36,16 +36,6 @@ The following methods exist for installing kubectl on macOS:
3636
{{< /tab >}}
3737
{{< /tabs >}}
3838

39-
Download kubectl-convert (optional)
40-
{{< tabs name="download_binary_macos" >}}
41-
{{< tab name="Intel" codelang="bash" >}}
42-
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl-convert"
43-
{{< /tab >}}
44-
{{< tab name="Apple Silicon" codelang="bash" >}}
45-
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl-convert"
46-
{{< /tab >}}
47-
{{< /tabs >}}
48-
4939
{{< note >}}
5040
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.
5141

@@ -63,7 +53,7 @@ The following methods exist for installing kubectl on macOS:
6353

6454
{{< /note >}}
6555

66-
1. Validate the kubectl binary (optional)
56+
1. Validate the binary (optional)
6757

6858
Download the kubectl checksum file:
6959

@@ -99,68 +89,19 @@ The following methods exist for installing kubectl on macOS:
9989
Download the same version of the binary and checksum.
10090
{{< /note >}}
10191

102-
1. Validate the kubectl-convert binary (optional)
103-
104-
Download the kubectl checksum file:
105-
106-
{{< tabs name="download_checksum_macos" >}}
107-
{{< tab name="Intel" codelang="bash" >}}
108-
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl-convert.sha256"
109-
{{< /tab >}}
110-
{{< tab name="Apple Silicon" codelang="bash" >}}
111-
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl-convert.sha256"
112-
{{< /tab >}}
113-
{{< /tabs >}}
114-
115-
Validate the kubectl binary against the checksum file:
116-
117-
```bash
118-
echo "$(<kubectl-convert.sha256) kubectl-convert" | shasum -a 256 --check
119-
```
120-
121-
If valid, the output is:
122-
123-
```console
124-
kubectl-convert: OK
125-
```
126-
127-
If the check fails, `shasum` exits with nonzero status and prints output similar to:
128-
129-
```bash
130-
kubectl-convert: FAILED
131-
shasum: WARNING: 1 computed checksum did NOT match
132-
```
133-
134-
{{< note >}}
135-
Download the same version of the binary and checksum.
136-
{{< /note >}}
137-
13892
1. Make the kubectl binary executable.
13993

14094
```bash
14195
chmod +x ./kubectl
14296
```
14397

144-
Make kubectl-convert binary executable (optional).
145-
146-
```bash
147-
chmod +x ./kubectl-convert
148-
```
149-
15098
1. Move the kubectl binary to a file location on your system `PATH`.
15199

152100
```bash
153101
sudo mv ./kubectl /usr/local/bin/kubectl
154102
sudo chown root: /usr/local/bin/kubectl
155103
```
156104

157-
Move the kubectl-convert binary to your system `PATH` (optional)
158-
159-
```bash
160-
sudo mv ./kubectl /usr/local/bin/kubectl-convert
161-
sudo chown root: /usr/local/bin/kubectl-convert
162-
```
163-
164105
{{< note >}}
165106
Make sure `/usr/local/bin` is in your PATH environment variable.
166107
{{< /note >}}
@@ -214,7 +155,7 @@ If you are on macOS and using [Macports](https://macports.org/) package manager,
214155

215156
{{< include "included/verify-kubectl.md" >}}
216157

217-
## Optional kubectl configurations
158+
## Optional kubectl configurations and plugins
218159

219160
### Enable shell autocompletion
220161

@@ -227,6 +168,74 @@ Below are the procedures to set up autocompletion for Bash and Zsh.
227168
{{< tab name="Zsh" include="included/optional-kubectl-configs-zsh.md" />}}
228169
{{< /tabs >}}
229170

171+
### Install kubectl convert plugin
172+
173+
{{< include "included/kubectl-convert-overview.md" >}}
174+
175+
1. Download the latest release with the command:
176+
177+
{{< tabs name="download_convert_binary_macos" >}}
178+
{{< tab name="Intel" codelang="bash" >}}
179+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl-convert"
180+
{{< /tab >}}
181+
{{< tab name="Apple Silicon" codelang="bash" >}}
182+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl-convert"
183+
{{< /tab >}}
184+
{{< /tabs >}}
185+
186+
1. Validate the binary (optional)
187+
188+
Download the kubectl checksum file:
189+
190+
{{< tabs name="download_convert_checksum_macos" >}}
191+
{{< tab name="Intel" codelang="bash" >}}
192+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/amd64/kubectl-convert.sha256"
193+
{{< /tab >}}
194+
{{< tab name="Apple Silicon" codelang="bash" >}}
195+
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/darwin/arm64/kubectl-convert.sha256"
196+
{{< /tab >}}
197+
{{< /tabs >}}
198+
199+
Validate the kubectl-convert binary against the checksum file:
200+
201+
```bash
202+
echo "$(<kubectl-convert.sha256) kubectl-convert" | shasum -a 256 --check
203+
```
204+
205+
If valid, the output is:
206+
207+
```console
208+
kubectl-convert: OK
209+
```
210+
211+
If the check fails, `shasum` exits with nonzero status and prints output similar to:
212+
213+
```bash
214+
kubectl-convert: FAILED
215+
shasum: WARNING: 1 computed checksum did NOT match
216+
```
217+
218+
{{< note >}}
219+
Download the same version of the binary and checksum.
220+
{{< /note >}}
221+
222+
1. Make kubectl-convert binary executable
223+
224+
```bash
225+
chmod +x ./kubectl-convert
226+
```
227+
228+
1. Move the kubectl-convert binary to a file location on your system `PATH`.
229+
230+
```bash
231+
sudo mv ./kubectl /usr/local/bin/kubectl-convert
232+
sudo chown root: /usr/local/bin/kubectl-convert
233+
```
234+
235+
{{< note >}}
236+
Make sure `/usr/local/bin` is in your PATH environment variable.
237+
{{< /note >}}
238+
230239
## {{% heading "whatsnext" %}}
231240

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

0 commit comments

Comments
 (0)