@@ -36,16 +36,6 @@ The following methods exist for installing kubectl on macOS:
36
36
{{< /tab >}}
37
37
{{< /tabs >}}
38
38
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
-
49
39
{{< note >}}
50
40
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.
51
41
@@ -63,7 +53,7 @@ The following methods exist for installing kubectl on macOS:
63
53
64
54
{{< /note >}}
65
55
66
- 1 . Validate the kubectl binary (optional)
56
+ 1 . Validate the binary (optional)
67
57
68
58
Download the kubectl checksum file:
69
59
@@ -99,68 +89,19 @@ The following methods exist for installing kubectl on macOS:
99
89
Download the same version of the binary and checksum.
100
90
{{< /note >}}
101
91
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
-
138
92
1 . Make the kubectl binary executable.
139
93
140
94
``` bash
141
95
chmod +x ./kubectl
142
96
```
143
97
144
- Make kubectl-convert binary executable (optional).
145
-
146
- ``` bash
147
- chmod +x ./kubectl-convert
148
- ```
149
-
150
98
1 . Move the kubectl binary to a file location on your system ` PATH ` .
151
99
152
100
``` bash
153
101
sudo mv ./kubectl /usr/local/bin/kubectl
154
102
sudo chown root: /usr/local/bin/kubectl
155
103
```
156
104
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
-
164
105
{{< note >}}
165
106
Make sure ` /usr/local/bin ` is in your PATH environment variable.
166
107
{{< /note >}}
@@ -214,7 +155,7 @@ If you are on macOS and using [Macports](https://macports.org/) package manager,
214
155
215
156
{{< include "included/verify-kubectl.md" >}}
216
157
217
- ## Optional kubectl configurations
158
+ ## Optional kubectl configurations and plugins
218
159
219
160
### Enable shell autocompletion
220
161
@@ -227,6 +168,74 @@ Below are the procedures to set up autocompletion for Bash and Zsh.
227
168
{{< tab name="Zsh" include="included/optional-kubectl-configs-zsh.md" />}}
228
169
{{< /tabs >}}
229
170
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
+
230
239
## {{% heading "whatsnext" %}}
231
240
232
241
{{< include "included/kubectl-whats-next.md" >}}
0 commit comments